Board index » delphi » word 97 dlls vs word 6.0 dlls

word 97 dlls vs word 6.0 dlls

    i used an older version of delphi to create a dll that is used in
word 6.0 to lookup a client name. Any idea why this does not work in
word 97?

In delphi the function is defined as  "function ClientLookup: integer;
export;"
In word the function is defined as Private Declare Function ClientLookup
Lib "c:\windows\clients.dll" () As Integer

the error message is file not found "c:\windows\clients.dll" but I am
%100 sure its there.

 

Re:word 97 dlls vs word 6.0 dlls


My guess is that as the DLL needs to be converted to a 32bit DLL. Word 7 is
a 32bit piece of software. remember to add the StdCall key word to the
function definition to make it compatible with 32bit non-delphi
applications.

i.e
    function ClientLookup: integer; stdcall; export;

Hope this helps
Glen
CSM Limited

Quote
b...@air-inc.com wrote in message <35C2232B.ECA3...@air-inc.com>...
>    i used an older version of delphi to create a dll that is used in
>word 6.0 to lookup a client name. Any idea why this does not work in
>word 97?

>In delphi the function is defined as  "function ClientLookup: integer;
>export;"
>In word the function is defined as Private Declare Function ClientLookup
>Lib "c:\windows\clients.dll" () As Integer

>the error message is file not found "c:\windows\clients.dll" but I am
>%100 sure its there.

Re:word 97 dlls vs word 6.0 dlls


Word95 or later cannot call a 16-bit dll.
I stumbled accross that one when converting a Word6 macro
that used GetModuleUsage to Word95.

Matthias Claes
Commence Belgium
matth...@{*word*104}dyne.be

Quote
b...@air-inc.com wrote in message <35C2232B.ECA3...@air-inc.com>...
>    i used an older version of delphi to create a dll that is used in
>word 6.0 to lookup a client name. Any idea why this does not work in
>word 97?

>In delphi the function is defined as  "function ClientLookup: integer;
>export;"
>In word the function is defined as Private Declare Function ClientLookup
>Lib "c:\windows\clients.dll" () As Integer

>the error message is file not found "c:\windows\clients.dll" but I am
>%100 sure its there.

Other Threads