Please help! C++ DLL does not call my function in C10 DLL

Hi all,

My problem has been solved!
Please see the attached screenshot.

Does anybody know in VC++ how to load a procedure by name and not by number anymore? So that I can use one and the same VC++ DLL for my C6.3 and C10 application.

Best regards and thank you again for all your help!

Best regards
Jeffrey

1 Like

In the EXP file I would think the order of exports is the Ordinal Number. They appear to be in alpha order (template does #FOR(%Procedure) ) so if you add an export named ‘CL_Before_Read’ then CL_ReadRecord would be 2nd. Look at the EXP to see.

I would also think if the EXP line CL_ReadRecord @? was @2 it would be Ordinal 2, so how to override the APP generated EXP? There are embeds into the EXP. Possibly mark the Function NOT exported in the APP so the templates will not put it in the EXP. Then add it in the EXP Embed “Top of export list” first as CL_ReadRecord @2

1 Like

Why can’t you change your call to GetProcAddress() to use the function name instead of the ordinal?

lpfnIcmpCreateFile  = (FARPROC)GetProcAddress(hICMP_DLL,"IcmpCreateFile");
lpfnIcmpCloseHandle = (FARPROC)GetProcAddress(hICMP_DLL,"IcmpCloseHandle");
lpfnIcmpSendEcho    = (FARPROC)GetProcAddress(hICMP_DLL,"IcmpSendEcho");
2 Likes

Thank you Carl.

Best regards
Jeffrey

Hi Abdullah,

Yes, I will use the function name now so it won’t happen again.

Best regards
Jeffrey

I hope in C10 dll the function with ordinal number 2 is not “TruncateEntireDatabase”.

1 Like

That’s a good one Mike! :grinning:

Best regards
Jeffrey