Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

hInst in COM server

rahzan
New Contributor I
906 Views
A section in the doc discusses getting hInst in dllmain for dialog boxes. I;d like to know if this also applies to COM servers and if so, where in the general scheme of files does the Dllmain go?

Thanks, Tim
0 Kudos
3 Replies
Intel_C_Intel
Employee
906 Views
Yes, it does apply to DLL COM servers. Dllmain is in a file generated by the wizard, DLLMAIN.F90. That routine saves the hinst in a module, DllGlobal, in a variable named ghinst. In your code, you should be able to USE DllGlobal and get the value from ghinst.

Leo
0 Kudos
rahzan
New Contributor I
906 Views
Sorry, this seems a little 'too" easy! so I have to check:
So all one needs is to stick in a "use dllglobal" in wherever needed and use the variable ghinst in the for hInst.

Thanks,
Tim
0 Kudos
Intel_C_Intel
Employee
906 Views
Correct!

Leo
0 Kudos
Reply