Fix building all rosapps modules

svn path=/branches/ros-amd64-bringup/; revision=44476
This commit is contained in:
Samuel Serapion 2009-12-09 01:15:20 +00:00
parent ad9860b254
commit fee45191b7
14 changed files with 38 additions and 38 deletions

View file

@ -54,7 +54,7 @@ BOOL CALLBACK EnumSymbolsProc(
ULONG SymbolSize,
PVOID UserContext)
{
if ((UINT)UserContext == -1)
if ((UINT_PTR)UserContext == -1)
{
printf("%s ", pSymInfo->Name);
}
@ -62,11 +62,11 @@ BOOL CALLBACK EnumSymbolsProc(
{
if (!bX64)
{
printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
printf("%s@%p ", pSymInfo->Name, UserContext);
}
else
{
printf("%s <+ %d> ", pSymInfo->Name, (UINT)UserContext);
printf("%s <+ %p> ", pSymInfo->Name, UserContext);
}
}
return TRUE;
@ -153,9 +153,9 @@ cont:
pW32pServiceTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceTable");
pW32pServiceLimit = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceLimit");
pW32pArgumentTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pArgumentTable");
// printf("pW32pServiceTable = %p\n", pW32pServiceTable);
// printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
// printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
printf("pW32pServiceTable = %p\n", pW32pServiceTable);
printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
if (!pW32pServiceTable || !pW32pServiceLimit || !pW32pArgumentTable)
{
@ -172,7 +172,7 @@ cont:
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}
@ -183,7 +183,7 @@ cont:
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}

View file

@ -121,7 +121,7 @@ EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PEDIT_GLYPH_INFO Info;
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_INITDIALOG)
{
@ -136,9 +136,9 @@ EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Info->hEdit = GetDlgItem(hwnd, IDC_EDIT_GLYPH_EDIT);
Info->hPreview = GetDlgItem(hwnd, IDC_EDIT_GLYPH_PREVIEW);
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
SetWindowLongW(Info->hEdit, GWLP_USERDATA, (LONG)Info);
SetWindowLongW(Info->hPreview, GWLP_USERDATA, (LONG)Info);
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
SetWindowLongPtrW(Info->hEdit, GWLP_USERDATA, (LONG_PTR)Info);
SetWindowLongPtrW(Info->hPreview, GWLP_USERDATA, (LONG_PTR)Info);
InitToolbox(Info);
@ -154,7 +154,7 @@ EditGlyphEditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PEDIT_GLYPH_INFO Info;
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{
@ -232,7 +232,7 @@ EditGlyphPreviewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PEDIT_GLYPH_INFO Info;
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{

View file

@ -250,7 +250,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PFONT_WND_INFO Info;
Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
@ -258,7 +258,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
case WM_CREATE:
Info = (PFONT_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
// Set a fixed window size
SetWindowPos(hwnd, NULL, 0, 0, FONT_BOXES_WND_WIDTH, FONT_BOXES_WND_HEIGHT, SWP_NOZORDER | SWP_NOMOVE);

View file

@ -99,7 +99,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PFONT_WND_INFO Info;
Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
@ -115,7 +115,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Info = (PFONT_WND_INFO)( ( (LPMDICREATESTRUCT) ( (LPCREATESTRUCT)lParam )->lpCreateParams )->lParam );
Info->hSelf = hwnd;
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
CreateFontBoxesWindow(Info);

View file

@ -443,7 +443,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PMAIN_WND_INFO Info;
Info = (PMAIN_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
Info = (PMAIN_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
@ -490,7 +490,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Info = (PMAIN_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
Info->hMainWnd = hwnd;
Info->hMenu = GetMenu(hwnd);
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
hNextClipboardViewer = SetClipboardViewer(hwnd);

View file

@ -34,7 +34,7 @@ CListNode::CListNode(PVOID element, CListNode *next, CListNode *prev)
Prev = prev;
}
void* CListNode::operator new(/*size_t*/ UINT size)
void* CListNode::operator new(size_t size)
{
PVOID p;
if (hHeap == NULL) {

View file

@ -14,7 +14,7 @@ public:
CListNode();
CListNode(VOID *element, CListNode *next, CListNode *prev);
~CListNode() {};
void* operator new(/*size_t s*/ UINT s);
void* operator new(size_t s);
VOID operator delete(void* p);
VOID SetElement(PVOID element);

View file

@ -442,7 +442,7 @@ NTSTATUS TdiQueryAddress(
if (SnmpInfo.NumAddr != 1)
{
/* Skip loopback address */
*Address = DN2H(((PIPADDR_ENTRY)((ULONG)IpAddress + sizeof(IPADDR_ENTRY)))->Addr);
*Address = DN2H(((PIPADDR_ENTRY)((ULONG_PTR)IpAddress + sizeof(IPADDR_ENTRY)))->Addr);
}
else
{
@ -507,7 +507,7 @@ NTSTATUS TdiSendDatagram(
RtlZeroMemory(ConnectInfo, sizeof(TDI_CONNECTION_INFORMATION) + sizeof(TA_IP_ADDRESS));
ConnectInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
ConnectInfo->RemoteAddress = (PUCHAR) ((ULONG)ConnectInfo + sizeof(TDI_CONNECTION_INFORMATION));
ConnectInfo->RemoteAddress = (PUCHAR) ((ULONG_PTR)ConnectInfo + sizeof(TDI_CONNECTION_INFORMATION));
TA = (PTA_IP_ADDRESS)(ConnectInfo->RemoteAddress);
TA->TAAddressCount = 1;
@ -630,9 +630,9 @@ NTSTATUS TdiReceiveDatagram(
ReceiveInfo->RemoteAddressLength = 0;
ReceiveInfo->RemoteAddress = NULL;
ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((ULONG)ReceiveInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((ULONG_PTR)ReceiveInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
ReturnInfo->RemoteAddress = (PUCHAR) ((ULONG)ReturnInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnInfo->RemoteAddress = (PUCHAR) ((ULONG_PTR)ReturnInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnAddress = (PTA_IP_ADDRESS)(ReturnInfo->RemoteAddress);
ReturnAddress->TAAddressCount = 1;

View file

@ -317,7 +317,7 @@ VOID ParseCommandLine(LPWSTR szCmdLine, UCHAR *chOption, HWND *hwndParent)
if(isdigit(ch))
{
unsigned int i = _wtoi(szCmdLine - 1);
*hwndParent = (HWND)i;
*hwndParent = (HWND)(ULONG_PTR)i;
}
else
*hwndParent = NULL;

View file

@ -1011,7 +1011,7 @@ GetModuleEntryPoint (
PIMAGE_OPTIONAL_HEADER poh = (PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET (lpFile);
if (poh != NULL)
return (LPVOID)(ULONG_PTR)(poh->AddressOfEntryPoint);
return (LPVOID)(poh->AddressOfEntryPoint);
else
return NULL;
}

View file

@ -1,4 +1,4 @@
<module name="pedump" type="win32cui" installbase="system32" installname="pedump.exe">
<module name="pedump" type="win32cui" installbase="system32" installname="pedump.exe" allowwarnings="true">
<library>ntdll</library>
<file>pedump.c</file>
<file>pedump.rc</file>

View file

@ -47,7 +47,7 @@ void *PsaiMalloc(SIZE_T size)
NtCurrentProcess(),
&pBuf,
0,
(PULONG)&size,
&size,
MEM_COMMIT,
PAGE_READWRITE
);
@ -58,7 +58,7 @@ void *PsaiMalloc(SIZE_T size)
void PsaiFree(void *ptr)
{
ULONG nSize = 0;
size_t nSize = 0;
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
}
@ -117,7 +117,7 @@ ProcessHasDescendants (
if (NULL == pInfo) return 0;
do {
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
if ((Pid != (HANDLE)pInfo->UniqueProcessId) && (Pid == (HANDLE)pInfo->InheritedFromUniqueProcessId))
{
@ -183,7 +183,7 @@ PrintProcessAndDescendants (
/* Scan and print possible children */
do {
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
if (Pid == pInfo->InheritedFromUniqueProcessId)
{
@ -236,7 +236,7 @@ int WINAPI PrintProcessList (BOOL DisplayTree)
}
else
{
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
PrintProcessAndDescendants (pInfo, pInfoBase, 0);
}
@ -357,7 +357,7 @@ int WINAPI PrintProcess (char * PidStr)
CLIENT_ID ClientId = {0, 0};
ClientId.UniqueProcess = (PVOID) atol (PidStr);
ClientId.UniqueProcess = LongToPtr(atol (PidStr));
if (FALSE == AcquirePrivileges ())
{

View file

@ -1,6 +1,6 @@
<module name="tlist" type="win32cui" installbase="system32" installname="tlist.exe">
<library>epsapi</library>
<!-- <library>tgetopt</library> -->
<!--library>tgetopt</library> -->
<library>user32</library>
<library>ntdll</library>
<file>tlist.c</file>

View file

@ -75,14 +75,14 @@ AddExtension(LPTSTR ExtName,
PEXTENSION_INFO ExtInfo;
PEXTENSION_INFO Info;
TCHAR *t;
DWORD ln;
size_t ln;
ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO));
if (!ExtInfo)
return NULL;
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
ln = (DWORD)t - (DWORD)ExtName;
ln = t - ExtName;
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
memcpy (ExtInfo->ExtName, ExtName, ln);