Browse Source

* win32 test

peter 23 years ago
parent
commit
946f939f85
2 changed files with 33 additions and 0 deletions
  1. 13 0
      tests/webtbs/tw1873.pp
  2. 20 0
      tests/webtbs/ub1873.pp

+ 13 - 0
tests/webtbs/tw1873.pp

@@ -0,0 +1,13 @@
+{$ifdef win32}
+uses Windows,ub1873;
+var
+  s : SC_handle;
+  d : dword;
+begin
+  GetServiceDisplayNameA(s,nil,nil,d);
+{$else}
+begin
+  writeln('win32 only');
+{$endif}
+end.
+

+ 20 - 0
tests/webtbs/ub1873.pp

@@ -0,0 +1,20 @@
+{$mode delphi}
+unit ub1873;
+
+interface
+
+uses Windows;
+
+const
+  advapi32 = 'advapi32.dll';
+
+
+function GetServiceDisplayNameA(hSCManager: SC_HANDLE; lpServiceName: LPCSTR;
+  lpDisplayName: LPSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+
+implementation
+
+function GetServiceDisplayNameA; external advapi32 name 'GetServiceDisplayNameA';
+
+end.
+