- 积分
- 15842
- 明经币
- 个
- 注册时间
- 2007-3-27
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
程序是dll,不是arx,没有lib,直接Loadlibrary,GetProcAddress,sendStringToExecute,执行完之后直接跳出程序,回到cad进程,没有继续执行我的程序,不知什么原因?- HMODULE h=LoadLibrary(cadpath.GetBuffer(256));//GetModuleHandle(NULL);
- cadpath.ReleaseBuffer();
- typedef void *(CALLBACK *services)();//5171 public: static class AcEdGripCommandModeServices & __ptr64 __cdecl AcEdGripCommandModeServices::services(void)
- typedef void *(CALLBACK *sendStringToExecute)(void * n_services,wchar_t * str);//5168 public: 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));
复制代码 |
|