problem to load the dll

problem to load the dll

john4TMYX
Enthusiast Enthusiast
364 Views
3 Replies
Message 1 of 4

problem to load the dll

john4TMYX
Enthusiast
Enthusiast

Hi guys,

 

We have a com object which is used to register in the pc so the Inventor will pick it up. But now we need to use the addin file. I have converted the dll into the register-free dll and add a addin file to the Inventor. Now the Inventor can pick the addin file, but can't load our dll. What I want to know is that whether Inventor can print some error message so I could trace the issue. I  have compared the file with the sample file loftWithRailling, I didn't see much difference. I have also checked the compiler options, it is same as the sample project.

 

Can anyone please shows me how to get the error message from Inventor when it fails to load the dll?

 

I have changed the guid for the dll. 

0 Likes
365 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

Use messageboxes in each step of the code!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 4

john4TMYX
Enthusiast
Enthusiast

Hi guys,

 

I have found that there is problem to load the dll:

 

STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
AFX_MANAGE_STATE (AfxGetStaticModuleState ()) ;
if ( _AtlModule.GetClassObject (rclsid, riid, ppv) == S_OK )
return S_OK ;
AfxMessageBox(_T("something is wrong in DllGetClassObject"));
return AfxDllGetClassObject (rclsid, riid, ppv) ;
}

so if it is ok, then it should return S_OK, but my program always end up to run the AfxMessageBox, could anyone please show me where I should go? Is it the server class can't be created? Why the program runs ok when registering the COM object? InitInstance () works fine as the init function return S_OK.

 

Thank you.

Regards

Eric

0 Likes
Message 4 of 4

johnteng00
Advocate
Advocate

Hi guys,

 

thank you for help, my mistake is that I use the lib guid. I should use the class guid.

0 Likes