P
Paul Duncan
diggityduncs (Programmer) Nov 13, 2003
Hello,
I'm tring to use a win32/api dll in c#
The vendor I received the dll from doesn't know anything
about .net
I received two files
ACGAPI.DLL +
ACGAPI.LIB
and some example source code
Declaration:
Visual C/C++
extern "C" __declspec(dllimport) int __stdcall
V5_CalculateActivationCode(LPSTR lpSiteCode, LPSTR
lpProgramID, DWORD CustomFeatures, LPSTR
lpActivationCode, LPSTR lpRemovalCode)
Visual basic:
Declare Function V5_CalculateInitCode Lib "ACGAPI.DLL"
Alias "_V5_CalculateInitCode@20" (ByVal SiteCode As
String, ByVal ProgramID As String, ByVal CustomFeatures
As Long, ByVal ActivationCode As String, ByVal
RemovalCode As String) As Long
Parameters:
(in)
LPSTR lpSiteCode - Pointer to Site code string (8
characters long)
LPSTR lpProgramID - Pointer to ProgramID (24 characters
long)
DWORD CustomFeatures - Status of custom features (set to
0 if custom features are not required)
(out)
LPSTR lpActivationCode - Pointer to buffer for activation
code (should be at least 36 character long)
LPSTR lpRemovalCode - Pointer to buffer for removal code
(should be at least 9 character long)
This is code I came up with
using System.Runtime.InteropServices;
[DllImport("acgapi.dll")]
private static extern long V5_CalculateActivationCode
(string SiteCode,string ProgramID,long
CustomFeatures,string ActivationCode,string RemovalCode);
I get the following error when I run the code
Unable to find an entry point named
V5_CalculateActivationCode in DLL acgapi.dll
I believe it may something to do with the .lib file. In
the old visual studio you could add the .lib file in the
project settings
http://www.codeproject.com/audio/speech.asp?print=true
but I'm not sure where you do this VS.net
Any help here would greatly be appreciated,
Thanks,
Paul
Hello,
I'm tring to use a win32/api dll in c#
The vendor I received the dll from doesn't know anything
about .net
I received two files
ACGAPI.DLL +
ACGAPI.LIB
and some example source code
Declaration:
Visual C/C++
extern "C" __declspec(dllimport) int __stdcall
V5_CalculateActivationCode(LPSTR lpSiteCode, LPSTR
lpProgramID, DWORD CustomFeatures, LPSTR
lpActivationCode, LPSTR lpRemovalCode)
Visual basic:
Declare Function V5_CalculateInitCode Lib "ACGAPI.DLL"
Alias "_V5_CalculateInitCode@20" (ByVal SiteCode As
String, ByVal ProgramID As String, ByVal CustomFeatures
As Long, ByVal ActivationCode As String, ByVal
RemovalCode As String) As Long
Parameters:
(in)
LPSTR lpSiteCode - Pointer to Site code string (8
characters long)
LPSTR lpProgramID - Pointer to ProgramID (24 characters
long)
DWORD CustomFeatures - Status of custom features (set to
0 if custom features are not required)
(out)
LPSTR lpActivationCode - Pointer to buffer for activation
code (should be at least 36 character long)
LPSTR lpRemovalCode - Pointer to buffer for removal code
(should be at least 9 character long)
This is code I came up with
using System.Runtime.InteropServices;
[DllImport("acgapi.dll")]
private static extern long V5_CalculateActivationCode
(string SiteCode,string ProgramID,long
CustomFeatures,string ActivationCode,string RemovalCode);
I get the following error when I run the code
Unable to find an entry point named
V5_CalculateActivationCode in DLL acgapi.dll
I believe it may something to do with the .lib file. In
the old visual studio you could add the .lib file in the
project settings
http://www.codeproject.com/audio/speech.asp?print=true
but I'm not sure where you do this VS.net
Any help here would greatly be appreciated,
Thanks,
Paul