Инструменты пользователя

Инструменты сайта


подключить-как-dll-через-loadlibrary

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Последняя версия Следующая версия справа и слева
подключить-как-dll-через-loadlibrary [2020/04/16 14:16]
iserbin [Пример на C++]
подключить-как-dll-через-loadlibrary [2020/04/17 23:57]
iserbin
Строка 46: Строка 46:
     {     {
         // Load parameters from INI-file         // Load parameters from INI-file
-        [DllImport("​UniproScalesComServer.dll", CallingConvention = CallingConvention.StdCall)]+        [DllImport("​UniproScalesComServerWin32.dll", CallingConvention = CallingConvention.StdCall)]
         public static extern int vr1();         public static extern int vr1();
  
         // get weight from scales         // get weight from scales
-        [DllImport("​UniproScalesComServer.dll", CallingConvention = CallingConvention.StdCall)]+        [DllImport("​UniproScalesComServerWin32.dll", CallingConvention = CallingConvention.StdCall)]
         public static extern int gw1(int p_scales, ​         public static extern int gw1(int p_scales, ​
                                     ref double p_weight, ​                                     ref double p_weight, ​
Строка 57: Строка 57:
                                     ref int p_stab );                                     ref int p_stab );
         // send price         // send price
-        [DllImport("​UniproScalesComServer.dll", CallingConvention = CallingConvention.StdCall)]+        [DllImport("​UniproScalesComServerWin32.dll", CallingConvention = CallingConvention.StdCall)]
         public static extern int pp1(int p_scales, int p_price);         public static extern int pp1(int p_scales, int p_price);
  
         // press "​T"​         // press "​T"​
-        [DllImport("​UniproScalesComServer.dll", CallingConvention = CallingConvention.StdCall)]+        [DllImport("​UniproScalesComServerWin32.dll", CallingConvention = CallingConvention.StdCall)]
         public static extern int pt1(int p_scales);         public static extern int pt1(int p_scales);
  
Строка 132: Строка 132:
   end;   end;
  
-function scalesdll_Init():​ integer; stdcall; external 'UniproScalesComServer.dll' name '​vr1';​+function scalesdll_Init():​ integer; stdcall; external 'UniproScalesComServerWin32.dll' name '​vr1';​
  
 function scalesdll_GetWeight( function scalesdll_GetWeight(
Строка 140: Строка 140:
                   var p_cost:​Double;​                   var p_cost:​Double;​
                   var p_stab:​Int32                   var p_stab:​Int32
-                  ): integer; stdcall; external 'UniproScalesComServer.dll' name '​gw1';​+                  ): integer; stdcall; external 'UniproScalesComServerWin32.dll' name '​gw1';​
  
 function scalesdll_SendPrice( function scalesdll_SendPrice(
                   p_Num:​Int32;​                   p_Num:​Int32;​
                   p_Price:​Int32                   p_Price:​Int32
-                  ): integer; stdcall; external 'UniproScalesComServer.dll' name '​pp1';​+                  ): integer; stdcall; external 'UniproScalesComServerWin32.dll' name '​pp1';​
  
 function scalesdll_PressTara( function scalesdll_PressTara(
                   p_Num:Int32                   p_Num:Int32
-                  ): integer; stdcall; external 'UniproScalesComServer.dll' name '​pt1';​+                  ): integer; stdcall; external 'UniproScalesComServerWin32.dll' name '​pt1';​
  
 var var
Строка 222: Строка 222:
 int main() int main()
 { {
- global_hLib = LoadLibrary("​UniproScalesComServer.dll"​);​+ global_hLib = LoadLibrary("​UniproScalesComServerWin32.dll"​);​
  
  if (global_hLib == NULL)  if (global_hLib == NULL)
подключить-как-dll-через-loadlibrary.txt · Последние изменения: 2020/04/18 00:01 — iserbin