Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.1 KiB

  1. //=============================================================================
  2. // These are headers for common rw functions
  3. //=============================================================================
  4. //=============================================================================
  5. // Global definitions
  6. #define MAXSTR 8192
  7. #define Pad4(x) ((((x+3)>>2)<<2)-x)
  8. #define Pad16(x) ((((x+15)>>4)<<4)-x)
  9. extern UINT g_cp/* = CP_ACP*/; // Default to CP_ACP
  10. //=============================================================================
  11. // Functions prototypes
  12. UINT _MBSTOWCS( WCHAR * pwszOut, CHAR * pszIn, UINT nLength);
  13. UINT _WCSTOMBS( CHAR * pszOut, WCHAR * wszIn, UINT nLength);
  14. UINT _WCSLEN( WCHAR * pwszIn );
  15. UINT GetStringW( BYTE * * lplpBuf, LPSTR lpszText, LONG* pdwSize, WORD cLen );
  16. UINT GetStringA( BYTE * * lplpBuf, LPSTR lpszText, LONG* pdwSize );
  17. UINT GetPascalStringW( BYTE * * lplpBuf, LPSTR lpszText, WORD wMaxLen, LONG* pdwSize );
  18. UINT GetPascalStringA( BYTE * * lplpBuf, LPSTR lpszText, BYTE bMaxLen, LONG* pdwSize );
  19. UINT GetNameOrOrd( BYTE * * lplpBuf, WORD* wOrd, LPSTR lpszText, LONG* pdwSize );
  20. UINT GetNameOrOrdU( PUCHAR pRes, ULONG ulId, LPWSTR lpwszStrId, DWORD* pdwId );
  21. BYTE GetDWord( BYTE * * lplpBuf, DWORD* dwValue, LONG* pdwSize );
  22. BYTE GetWord( BYTE * * lplpBuf, WORD* wValue, LONG* pdwSize );
  23. BYTE GetByte( BYTE * * lplpBuf, BYTE* bValue, LONG* pdwSize );
  24. UINT PutStringA( BYTE * * lplpBuf, LPSTR lpszText, LONG* pdwSize );
  25. UINT PutStringW( BYTE * * lplpBuf, LPSTR lpszText, LONG* pdwSize );
  26. UINT PutNameOrOrd( BYTE * * lplpBuf, WORD wOrd, LPSTR lpszText, LONG* pdwSize );
  27. UINT PutPascalStringW( BYTE * * lplpBuf, LPSTR lpszText, WORD wLen, LONG* pdwSize );
  28. BYTE PutDWord( BYTE * * lplpBuf, DWORD dwValue, LONG* pdwSize );
  29. BYTE PutWord( BYTE * * lplpBuf, WORD wValue, LONG* pdwSize );
  30. BYTE PutByte( BYTE * * lplpBuf, BYTE bValue, LONG* pdwSize );
  31. UINT SkipByte( BYTE far * far * lplpBuf, UINT uiSkip, LONG* pdwRead );
  32. LONG ReadFile(CFile*, UCHAR *, LONG);
  33. UINT CopyFile( CFile* filein, CFile* fileout );
  34. LONG Allign( BYTE * * lplpBuf, LONG* plBufSize, LONG lSize );