1
votes

I am converting the following function. But the new converted function is not executed. Any ideas?

Old Function
extern "C"
DWORD __declspec(dllexport) FAR MyFunc (char *value1, int *value2)

New Function
extern "C"
DWORD _export FAR MyFunc (char *value1, int *value2)

1
any errors? have you tried stepping through it with a debugger?Winston Ewert
What's wrong with the __declspec(dllexport)? What's the _export definition? Check if you're using the correct DLL, and if the symbol was exported.jweyrich
The problem is fixed. The program was written in Delphi C++ builder. When i compiled the program, the compiler povides specific index for that function. But I was calling that function by using fixed index. Thank you guys.sMah

1 Answers

1
votes

_export is obsolete in the newer versions of Visual C++, see here.

Let me cite this article: It is not possible to maintain a single source for 16-bit and 32-bit code by simply replacing __export with _declspec() because _declspec() is a storage class modifier and __export is a type modifier. The article states, that _export only works for 16-bit programs. So you should actually produce a 16-bit program and DLL.