API reference problem

I have an API is implemented as a 32-bit driver (WRG3API.DLL) for Windows 98, 2000 and XP.

I want 2 use use it in my c# program.

Would it b a best idea to use pInvoke to reference its functions.

I tried to add the dll to my project 'refernces' in c#. through add reference option:

but it gave me an error:

Can any1 suggest what would b the problem. Is it got to do somthing with admin rights

o O o(`'·.,(`'·., ☆,.·''),.·'')o O o°
·'"` * *☆ t4ure4n ☆* * ·'"`
°o O o(,.·''(,.·'' ☆`'·.,)`'·.,)o O o°




Answer this question

API reference problem

  • FerroFreak

    "The error I received was this"

    A reference to ..............wrg303api.dll can't be added, This is not not a valid assembly or com component. Only assemblies with extension dll or com can be referrenced. Please make sure that the file is accessible, and that it is valid assembly or com component.



  • Gus Cortes

    What error

    But yeah you will have to write a managed wraper for the DLL. With p/invoke.


  • t nguyen

    Yes you can not add a refrence to a unmanaged DLL like that.
    You must write a wraper (like I said...)


  • API reference problem