visual c++ - VC++ Dll Not Working On Windows XP Sp3 When Using C++ Builder -


i have created vc++ dll in visual studio 2013.

extern "c"  int  __declspec(dllexport) __cdecl convertimagetotext(char* datapath, char* imagefilepath, char* captchacode) {   //    return 0; } 

i'm using in borland c++ builder 6 that.

  hmodule dllhandle = loadlibrary("captcha.dll");   int (__cdecl *convertimagetotext)(char*,char*,char*);   convertimagetotext =(int (__cdecl *)(char*,char*,char*))getprocaddress(dllhandle, "convertimagetotext");   if (convertimagetotext != null )   {     convertimagetotext("","","");   }else   {    showmessage("convertimagetotext pointer not found !");   } 

it's working in win7/8/8.1.there isn't problem.

but can't find pointer of convertimagetotext on windows xp sp3.

i have changed vc++ dll project "platform toolset" "visual studio 2013 - windows xp (v120_xp)".nothing not changed.

i have checked visual c++ redistributable packages.all installed

any sugguestions ?

you need implement proper error checking described documentation.

  1. test return value of loadlibrary. value of null indicates failure. if so, call getlasterror extended error details. e. test return value of getprocaddress. value of null indicates failure. if so, call getlasterror extended error details.

likely loadlibrary failing because dll linked runtime not installed on target machine, or because dll linked win32 api functions not exist on xp.

if cannot work out here can use dependency walker debugging. use in profile mode debug loader's attempt load dll. reveal enough information diagnose problem.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -