title: DLL importation
body: <p>I have to do a soft (using C#.NET) able to flash 2 microcontroller (CPU/PIC).
  To do it i have a VB6 DLL, unfortunately i can't use it easily in VS.
  I found a development kit wrotte in CPP</p>
  
  <p>this kit contain: </p>
  
  <ul>
  <li><p>a file Flasher.lib -> can't see the source code</p></li>
  <li><p>// Flasher.exp -> can't see the source code</p></li>
  <li><p>// DLL_interface.bas</p></li>
  </ul>
  
  <p>sample  DLL_interface.bad : </p>
  
  <pre><code>Option Explicit
  
  'dll function declarations
  
  Declare Function SetCom Lib "st10flasher.dll" (ByVal PortName$, ByVal comspeed As Long) As Long
  
  Declare Function LoadFile Lib "st10flasher.dll" (ByVal FileName$, ByRef Fsize As Long) As Long
  
  Declare Function InitMonitor Lib "st10flasher.dll" (ByVal device As Any) As Long
  
  Declare Function ProgramFlash Lib "st10flasher.dll" () As Long
  
  Declare Function GetError Lib "st10flasher.dll" (ByVal BufferForStatus As Any) As Long
  </code></pre>
  
  <ul>
  <li>// basicinterface.h </li>
  </ul>
  
  <p>sample BasicInterface.h </p>
  
  <pre><code>#ifndef _BASIC_INTERFACE_H
  #define _BASIC_INTERFACE_H
  
  #ifdef __cplusplus
  extern "C" 
  {
  #endif
  
  #ifndef ST10FLASHER_API
  #define ST10FLASHER_API __declspec(dllimport) // To import flasher function
  #endif
  
  // Communication function
  ST10FLASHER_API unsigned int PASCAL SetCom(char *PortName, unsigned int ComSpeed);
  ST10FLASHER_API unsigned int PASCAL CloseCom(void);
  ST10FLASHER_API unsigned int PASCAL ComIsKline(void);
  ST10FLASHER_API unsigned int PASCAL SetComSpeed(char *portName, unsigned int ComSpeed);
  ST10FLASHER_API unsigned int PASCAL CalibrateSpeed(char *PortName, unsigned int ComSpeed);
  ST10FLASHER_API unsigned int PASCAL IsAvailableBaudRate(const double frequency,const unsigned int     baudrate);
  </code></pre>
  
  <p>i have no idea how to use it. If someone have an idea please :) !
  Thank's a lot !</p>