Fixed GetCommConfig number of arguments.

This commit is contained in:
Patrik Stridvall 2001-06-19 03:44:16 +00:00 committed by Alexandre Julliard
parent a3fd0c95ee
commit cd6b8cadce
3 changed files with 9 additions and 6 deletions

View File

@ -3109,7 +3109,7 @@ BOOL WINAPI CommConfigDialogW(
} }
/*********************************************************************** /***********************************************************************
* GetCommConfig (KERNEL32.283) * GetCommConfig (KERNEL32.@)
* *
* Fill in the COMMCONFIG structure for the comm port hFile * Fill in the COMMCONFIG structure for the comm port hFile
* *
@ -3126,12 +3126,10 @@ BOOL WINAPI CommConfigDialogW(
*/ */
BOOL WINAPI GetCommConfig( BOOL WINAPI GetCommConfig(
HANDLE hFile, /* [in] The communications device. */ HANDLE hFile, /* [in] The communications device. */
LPCOMMCONFIG lpCommConfig) /* [out] The communications configuration of the device (if it fits). */ LPCOMMCONFIG lpCommConfig, /* [out] The communications configuration of the device (if it fits). */
#if 0 /* FIXME: Why is this "commented" out? */
LPDWORD lpdwSize) /* [in/out] Initially the size of the configuration buffer/structure, LPDWORD lpdwSize) /* [in/out] Initially the size of the configuration buffer/structure,
afterwards the number of bytes copied to the buffer or afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */ the needed size of the buffer. */
#endif
{ {
BOOL r; BOOL r;
@ -3140,6 +3138,11 @@ BOOL WINAPI GetCommConfig(
if(lpCommConfig == NULL) if(lpCommConfig == NULL)
return FALSE; return FALSE;
r = *lpdwSize < sizeof(COMMCONFIG);
*lpdwSize = sizeof(COMMCONFIG);
if(!r)
return FALSE;
lpCommConfig->dwSize = sizeof(COMMCONFIG); lpCommConfig->dwSize = sizeof(COMMCONFIG);
lpCommConfig->wVersion = 1; lpCommConfig->wVersion = 1;
lpCommConfig->wReserved = 0; lpCommConfig->wReserved = 0;

View File

@ -324,7 +324,7 @@ debug_channels (comm debugstr dll int resource stress thunk toolhelp win32)
@ stdcall GetBinaryTypeA(ptr ptr) GetBinaryTypeA @ stdcall GetBinaryTypeA(ptr ptr) GetBinaryTypeA
@ stdcall GetBinaryTypeW(ptr ptr) GetBinaryTypeW @ stdcall GetBinaryTypeW(ptr ptr) GetBinaryTypeW
@ stdcall GetCPInfo(long ptr) GetCPInfo @ stdcall GetCPInfo(long ptr) GetCPInfo
@ stdcall GetCommConfig(long ptr) GetCommConfig @ stdcall GetCommConfig(long ptr long) GetCommConfig
@ stdcall GetCommMask(long ptr) GetCommMask @ stdcall GetCommMask(long ptr) GetCommMask
@ stdcall GetCommModemStatus(long ptr) GetCommModemStatus @ stdcall GetCommModemStatus(long ptr) GetCommModemStatus
@ stdcall GetCommProperties(long ptr) GetCommProperties @ stdcall GetCommProperties(long ptr) GetCommProperties

View File

@ -1333,7 +1333,7 @@ BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD); VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
PVOID WINAPI FreeSid(PSID); PVOID WINAPI FreeSid(PSID);
UINT WINAPI GetACP(void); UINT WINAPI GetACP(void);
BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG); BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,LPDWORD);
BOOL WINAPI GetCommMask(HANDLE,LPDWORD); BOOL WINAPI GetCommMask(HANDLE,LPDWORD);
BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD); BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP); BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);