tags:

views:

30

answers:

1

Hi,

I am trying to add the following dll as reference in the VS2010. but it keeps throwing the "Please make sure it is a valid assembly or com" error. When I tried to register the dll using regsvr32, it says "Not able to find an entry point". Can you please let me know how to make it work?

The dll can be downloaded from Here

The example C# code provided by the vendor is Here

EDIT:

The example code does use DllImport property. When I run it, it says not able to find the dll. So I was trying to add it as a reference. I am new to C# so not sure what the problem is. It breaks in the following line :

ftStatus = GetDllVersion(byteDllVersion, MAX_NUM_DLL_VERSION_CHARS);

Line 747 in the example code.

Thanks...

+1  A: 

If the dll is not developed under.Net , then you con not add it as a reference to your project. Paste your dll in the Application startup path(Bin\Debug) and import the dll like

 [DllImportAttribute(@".\FTCI2C64.dll", EntryPoint = "I2C_GetDllVersion", CallingConvention = CallingConvention.Cdecl)]
    static extern uint GetDllVersion(byte[] pDllVersion, uint buufferSize);
Pramodh
Please see the Edit.
Manoj
Thanks that worked
Manoj