ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why I Failed to Get “AutoCAD::IAcadApplicationPtr” on Win7 64-bit

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
cisdicad02
1642 Views, 6 Replies

Why I Failed to Get “AutoCAD::IAcadApplicationPtr” on Win7 64-bit

initialize COM interface in entry function As follows:

if (!AfxOleInit())
{
AfxMessageBox(_T("COM interface Initialization failed"));
return (retCode);
}

 

Call COM interfaces As follows:

try
{
AutoCAD::IAcadApplicationPtr app=acedGetAcadWinApp()->GetIDispatch(FALSE);
if (app==NULL)
{
acutPrintf(_T("Get IAcadApplicationPtr  Failed\n"));
return;
}

}

 

The above codes run successfully under XP 32-bit

When I use these codes under Win7 64-bit,they run Incorrectly and return "Get IAcadApplicationPtr  Failed"

 

Grateful for any help on this problem!

6 REPLIES 6
Message 2 of 7
owenwengerd
in reply to: cisdicad02

Are you importing the 64-bit type library when you build for x64?

--
Owen Wengerd
ManuSoft
Message 3 of 7
cisdicad02
in reply to: owenwengerd

Yes,I have imported the 64-bit type include and library files in my porject, and I have successfully run other founctions on Win7 64-bit
Message 4 of 7
owenwengerd
in reply to: cisdicad02

I suggest to write step-by-step code to obtain an IDispatch and query it for IAcadApplication so you can determine exactly which step is failing.

--
Owen Wengerd
ManuSoft
Message 5 of 7
cisdicad02
in reply to: owenwengerd

Thank you very much!
I will try what you suggest,and I need your help if there is a problem
Message 6 of 7
xiaodong_liang
in reply to: cisdicad02

This customer logged case through ADN in the same time. We cannot reproduce this issue, and shared some suggestions to isolate the problem. Finally, they solved: I built the ARX of 64 on a XP-32. The problem occurred. I rebuilt the ARX on my colleague's machine Win7-64. It works well. marked as solved.
Message 7 of 7
cisdicad02
in reply to: xiaodong_liang

Thank you very much !
In your help and guidance, the problem has been resolved

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost