xref: /AOO41X/main/sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.cpp (revision fc0bc00825ec02ef04af0b032f1c57b312b79937)
1*fc0bc008SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*fc0bc008SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*fc0bc008SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*fc0bc008SAndrew Rist  * distributed with this work for additional information
6*fc0bc008SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*fc0bc008SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*fc0bc008SAndrew Rist  * "License"); you may not use this file except in compliance
9*fc0bc008SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*fc0bc008SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*fc0bc008SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*fc0bc008SAndrew Rist  * software distributed under the License is distributed on an
15*fc0bc008SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*fc0bc008SAndrew Rist  * KIND, either express or implied.  See the License for the
17*fc0bc008SAndrew Rist  * specific language governing permissions and limitations
18*fc0bc008SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*fc0bc008SAndrew Rist  *************************************************************/
21*fc0bc008SAndrew Rist 
22*fc0bc008SAndrew Rist 
23cdf0e10cSrcweir #include "macros.h"
24cdf0e10cSrcweir #ifdef __MINGW32__
25cdf0e10cSrcweir DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeMountPointA, (LPSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength) )
26cdf0e10cSrcweir #else
27cdf0e10cSrcweir DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeMountPointA, (LPCSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength) )
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir /*
30cdf0e10cSrcweir extern "C" _declspec( dllexport ) FARPROC kernel32_FindFirstVolumeMountPointA_Ptr;
31cdf0e10cSrcweir static HANDLE __stdcall FindFirstVolumeMountPointA_Failure (LPSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength);
32cdf0e10cSrcweir static _declspec ( naked ) void FindFirstVolumeMountPointA_Thunk()
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 	 ResolveThunk_TRYLOAD( &kernel32_FindFirstVolumeMountPointA_Ptr, "kernel32" ".dll", "FindFirstVolumeMountPointA", 0, (FARPROC)FindFirstVolumeMountPointA_Failure );
35cdf0e10cSrcweir 	 _asm jmp [kernel32_FindFirstVolumeMountPointA_Ptr] }
36cdf0e10cSrcweir 
37cdf0e10cSrcweir //extern "C" _declspec( naked ) HANDLE __stdcall
38cdf0e10cSrcweir //extern "C" HANDLE WINAPI
39cdf0e10cSrcweir extern "C" _declspec( naked ) HANDLE __stdcall FindFirstVolumeMountPointA (LPCSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength)
40cdf0e10cSrcweir {
41cdf0e10cSrcweir 	_asm jmp [kernel32_FindFirstVolumeMountPointA_Ptr]
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
44cdf0e10cSrcweir extern "C" _declspec( dllexport ) FARPROC kernel32_FindFirstVolumeMountPointA_Ptr = (FARPROC)FindFirstVolumeMountPointA_Thunk;
45cdf0e10cSrcweir static HANDLE __stdcall FindFirstVolumeMountPointA_Failure (LPSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength)
46cdf0e10cSrcweir { SetLastError( 120L ); return (HANDLE)0; }
47cdf0e10cSrcweir */
48