dll中直接调用arx命令sendStringToExecute失败
程序是dll,不是arx,没有lib,直接Loadlibrary,GetProcAddress,sendStringToExecute,执行完之后直接跳出程序,回到cad进程,没有继续执行我的程序,不知什么原因?HMODULEh=LoadLibrary(cadpath.GetBuffer(256));//GetModuleHandle(NULL);cadpath.ReleaseBuffer();
typedef void *(CALLBACK *services)();//5171public: static class AcEdGripCommandModeServices & __ptr64 __cdecl AcEdGripCommandModeServices::services(void)
typedef void *(CALLBACK *sendStringToExecute)(void * n_services,wchar_t * str);//5168public: enum Acad::ErrorStatus __cdecl AcEdGripCommandModeServices::sendStringToExecute(class AcString const & __ptr64) __ptr64
services my_services=(services)GetProcAddress(h,MAKEINTRESOURCEA(5171));
void * m_services=my_services();
sendStringToExecute my_sendStringToExecute=(sendStringToExecute)GetProcAddress(h,MAKEINTRESOURCEA(5168));
my_sendStringToExecute(m_services,msg.GetBuffer(256));
页:
[1]