GCRTSSUtilities.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2014 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenICam
5 // Author: Maxime Dupont
6 // $Header$
7 // License: This file is published under the license of the EMVA GenICam Standard Group.
8 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
9 // If for some reason you are missing this file please contact the EMVA or visit the website
10 // (http://www.genicam.org) for a full copy.
11 //
12 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
13 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
16 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
19 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
22 // POSSIBILITY OF SUCH DAMAGE.
23 //-----------------------------------------------------------------------------
30 #ifndef GENAPI_GENAPIRTSSUTILITIES_DEF_H_
31 #define GENAPI_GENAPIRTSSUTILITIES_DEF_H_
32 
33 #include "crtdefs.h"
34 #include <stdio.h>
35 #include <errno.h>
36 #include <io.h>
37 #include "windows.h"
38 
39 #if defined(UNDER_RTSS) && defined(GENICAM_BUILD)
40 #if defined(htons)
41 #undef htons
42 #endif // defined(htons)
43 
44 #if defined(ntohs)
45 #undef ntohs
46 #endif // defined(ntohs)
47 
48 #if defined(htonl)
49 #undef htonl
50 #endif // defined(htonl)
51 
52 #if defined(ntohl)
53 #undef ntohl
54 #endif // defined(ntohl)
55 
56 
57 #define HTONS(n) (unsigned short)(((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
58 #define NTOHS(n) (unsigned short)(((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
59 
60 #define HTONL(n) (unsigned long)(((((unsigned long)(n) & 0xFF)) << 24) | \
61  ((((unsigned long)(n) & 0xFF00)) << 8) | \
62  ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
63  ((((unsigned long)(n) & 0xFF000000)) >> 24))
64 
65 #define NTOHL(n) (unsigned long)(((((unsigned long)(n) & 0xFF)) << 24) | \
66  ((((unsigned long)(n) & 0xFF00)) << 8) | \
67  ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
68  ((((unsigned long)(n) & 0xFF000000)) >> 24))
69 
70 #define htons(n) HTONS(n)
71 #define ntohs(n) NTOHS(n)
72 
73 #define htonl(n) HTONL(n)
74 #define ntohl(n) NTOHL(n)
75 
76 #endif
77 
78 
79 #if defined(UNDER_RTSS)
80 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
85 WINBASEAPI __out HANDLE WINAPI FindFirstFileExW(
86  __in LPCWSTR lpFileName,
87  __in FINDEX_INFO_LEVELS fInfoLevelId,
88  __out LPVOID lpFindFileData,
89  __in FINDEX_SEARCH_OPS fSearchOp,
90  __reserved LPVOID lpSearchFilter,
91  __in DWORD dwAdditionalFlags
92  );
93 
94 WINBASEAPI __out HANDLE WINAPI FindFirstFileExA(
95  __in LPCSTR lpFileName,
96  __in FINDEX_INFO_LEVELS fInfoLevelId,
97  __out LPVOID lpFindFileData,
98  __in FINDEX_SEARCH_OPS fSearchOp,
99  __reserved LPVOID lpSearchFilter,
100  __in DWORD dwAdditionalFlags
101  );
102 
103 WINBASEAPI BOOL WINAPI FindNextFileW(
104  __in HANDLE hFindFile,
105  __out LPWIN32_FIND_DATAW lpFindFileData
106  );
107 
108 WINBASEAPI BOOL WINAPI FindNextFileA(
109  __in HANDLE hFindFile,
110  __out LPWIN32_FIND_DATAA lpFindFileData
111  );
112 
113 WINBASEAPI BOOL WINAPI FindClose(
114  __inout HANDLE hFindHandle
115  );
116 
117 WINBASEAPI BOOL WINAPI SystemTimeToTzSpecificLocalTime(
118  __in_opt CONST TIME_ZONE_INFORMATION * lpTimeZoneInformation,
119  __in CONST SYSTEMTIME * lpUniversalTime,
120  __out LPSYSTEMTIME lpLocalTime
121  );
122 
123 WINBASEAPI UINT WINAPI GetDriveTypeW(
124  __in_opt LPCWSTR lpRootPathName
125  );
126 
127 WINBASEAPI UINT WINAPI GetDriveTypeA(
128  __in_opt LPCSTR lpRootPathName
129  );
130 
131 WINBASEAPI BOOL WINAPI GetFileInformationByHandle(
132  __in HANDLE hFile,
133  __out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
134  );
135 
136 
137 WINBASEAPI BOOL WINAPI PeekNamedPipe(
138  __in HANDLE hNamedPipe,
139  __out_bcount_part_opt(nBufferSize, *lpBytesRead) LPVOID lpBuffer,
140  __in DWORD nBufferSize,
141  __out_opt LPDWORD lpBytesRead,
142  __out_opt LPDWORD lpTotalBytesAvail,
143  __out_opt LPDWORD lpBytesLeftThisMessage
144  );
145 
146 WINBASEAPI DWORD WINAPI GetFullPathNameW(
147  __in LPCWSTR lpFileName,
148  __in DWORD nBufferLength,
149  __out_ecount_part_opt(nBufferLength, return +1) LPWSTR lpBuffer,
150  __deref_opt_out LPWSTR * lpFilePart
151  );
152 
153 WINBASEAPI BOOL WINAPI SetCurrentDirectoryW(
154  __in LPCWSTR lpPathName
155  );
156 
157 WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(
158  __in DWORD nBufferLength,
159  __out_ecount_part_opt(nBufferLength, return +1) LPWSTR lpBuffer
160  );
161 
162 WINBASEAPI DWORD WINAPI GetFullPathNameA(
163  __in LPCSTR lpFileName,
164  __in DWORD nBufferLength,
165  __out_ecount_part_opt(nBufferLength, return +1) LPSTR lpBuffer,
166  __deref_opt_out LPSTR * lpFilePart
167  );
168 
169 WINBASEAPI UINT WINAPI SetErrorMode(
170  __in UINT uMode
171  );
172 
173 WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
174 
175 
176 WINBASEAPI DWORD WINAPI GetFileAttributesW(
177  __in LPCWSTR lpFileName
178  );
179 
180 WINBASEAPI DWORD WINAPI GetFileAttributesA(
181  __in LPCSTR lpFileName
182  );
183 
184 WINBASEAPI BOOL WINAPI GetFileAttributesExW(
185  __in LPCWSTR lpFileName,
186  __in GET_FILEEX_INFO_LEVELS fInfoLevelId,
187  __out LPVOID lpFileInformation
188  );
189 
190 WINBASEAPI BOOL WINAPI GetModuleHandleExA(
191  __in DWORD dwFlags,
192  __in_opt LPCSTR lpModuleName,
193  __out HMODULE * phModule
194  );
195 
196 WINBASEAPI HLOCAL WINAPI LocalFree(
197  __deref HLOCAL hMem
198  );
199 
200 WINBASEAPI BOOL WINAPI CopyFileA(
201  __in LPCSTR lpExistingFileName,
202  __in LPCSTR lpNewFileName,
203  __in BOOL bFailIfExists
204  );
205 
206 // ************************************************************************
207 // ********** GenAPITest section **********
208 // ************************************************************************
209 
210 WINBASEAPI UINT WINAPI GetSystemDirectoryA(
211  __out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
212  __in UINT uSize
213  );
214 
215 WINBASEAPI DWORD WINAPI GetTempPathA(
216  __in DWORD nBufferLength,
217  __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
218  );
219 
220 WINBASEAPI BOOL WINAPI GetThreadTimes(
221  __in HANDLE hThread,
222  __out LPFILETIME lpCreationTime,
223  __out LPFILETIME lpExitTime,
224  __out LPFILETIME lpKernelTime,
225  __out LPFILETIME lpUserTime
226  );
227 
228 WINBASEAPI BOOL WINAPI SetConsoleOutputCP(
229  __in UINT wCodePageID
230  );
231 
232 WINBASEAPI BOOL WINAPI SetEnvironmentVariableW(
233  __in LPCWSTR lpName,
234  __in_opt LPCWSTR lpValue
235  );
236 
237 
238 WINBASEAPI __success(return < nSize) __success(return != 0) DWORD WINAPI GetEnvironmentVariableA(
239  __in_opt LPCSTR lpName,
240  __out_ecount_part_opt(nSize, return + 1) LPSTR lpBuffer,
241  __in DWORD nSize
242  );
243 
244 WINBASEAPI BOOL WINAPI CopyFileW(
245  __in LPCWSTR lpExistingFileName,
246  __in LPCWSTR lpNewFileName,
247  __in BOOL bFailIfExists
248  );
249 
250 #ifdef __cplusplus
251 }
252 #endif
253 
254 #endif // defined(UNDER_RTSS)
255 
256 #endif // GENAPI_GENAPIRTSSUTILITIES_DEF_H_
257 


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40