vc中的函数声明如下:
short DllExport 
MLAdd_create_device    /*  Device creation                 */
(                               /*__________________________________________*/
  CHAR * o_pIndex,
  unsigned char  i_nDeviceType 
); vc中的调用如下:
 SHORT  l_nRep;
 CHAR  l_nDevice;
 #define  M_VIDEOLIVE   0x02
l_nRep = MLAdd_create_device(&l_nDevice, M_VIDEOLIVE);
请问:在delphi中该如何声明函数,如何定义函数参数类型,如何调用?
我做了如下声明及调用,但是就是不对,请大侠帮忙,万分感谢
 function MLAdd_create_device( o_pIndex:pchar;i_nDeviceType:byte):smallint; stdcall; external 'Add.dll';
var
  l_nRep:smallint; //
  l_nDevice:PChar; //
begin
  try
     GetMem(l_nDevice,8);
     l_nRep:=MLAdd_create_device(@l_nDevice,M_VIDEOLIVE); // M_VIDEOLIVE     //24582
  finally
 FreeMem(l_nDevice);
  end;
end;