mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
Fix building all rosapps modules
svn path=/branches/ros-amd64-bringup/; revision=44476
This commit is contained in:
parent
ad9860b254
commit
fee45191b7
14 changed files with 38 additions and 38 deletions
|
@ -54,7 +54,7 @@ BOOL CALLBACK EnumSymbolsProc(
|
||||||
ULONG SymbolSize,
|
ULONG SymbolSize,
|
||||||
PVOID UserContext)
|
PVOID UserContext)
|
||||||
{
|
{
|
||||||
if ((UINT)UserContext == -1)
|
if ((UINT_PTR)UserContext == -1)
|
||||||
{
|
{
|
||||||
printf("%s ", pSymInfo->Name);
|
printf("%s ", pSymInfo->Name);
|
||||||
}
|
}
|
||||||
|
@ -62,11 +62,11 @@ BOOL CALLBACK EnumSymbolsProc(
|
||||||
{
|
{
|
||||||
if (!bX64)
|
if (!bX64)
|
||||||
{
|
{
|
||||||
printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
|
printf("%s@%p ", pSymInfo->Name, UserContext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("%s <+ %d> ", pSymInfo->Name, (UINT)UserContext);
|
printf("%s <+ %p> ", pSymInfo->Name, UserContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -153,9 +153,9 @@ cont:
|
||||||
pW32pServiceTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceTable");
|
pW32pServiceTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceTable");
|
||||||
pW32pServiceLimit = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceLimit");
|
pW32pServiceLimit = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceLimit");
|
||||||
pW32pArgumentTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pArgumentTable");
|
pW32pArgumentTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pArgumentTable");
|
||||||
// printf("pW32pServiceTable = %p\n", pW32pServiceTable);
|
printf("pW32pServiceTable = %p\n", pW32pServiceTable);
|
||||||
// printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
|
printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
|
||||||
// printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
|
printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
|
||||||
|
|
||||||
if (!pW32pServiceTable || !pW32pServiceLimit || !pW32pArgumentTable)
|
if (!pW32pServiceTable || !pW32pServiceLimit || !pW32pArgumentTable)
|
||||||
{
|
{
|
||||||
|
@ -172,7 +172,7 @@ cont:
|
||||||
for (i = 0; i < dwServiceLimit; i++)
|
for (i = 0; i < dwServiceLimit; i++)
|
||||||
{
|
{
|
||||||
printf("0x%x:", i+0x1000);
|
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");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ cont:
|
||||||
for (i = 0; i < dwServiceLimit; i++)
|
for (i = 0; i < dwServiceLimit; i++)
|
||||||
{
|
{
|
||||||
printf("0x%x:", i+0x1000);
|
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");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PEDIT_GLYPH_INFO Info;
|
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)
|
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->hEdit = GetDlgItem(hwnd, IDC_EDIT_GLYPH_EDIT);
|
||||||
Info->hPreview = GetDlgItem(hwnd, IDC_EDIT_GLYPH_PREVIEW);
|
Info->hPreview = GetDlgItem(hwnd, IDC_EDIT_GLYPH_PREVIEW);
|
||||||
|
|
||||||
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
|
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
|
||||||
SetWindowLongW(Info->hEdit, GWLP_USERDATA, (LONG)Info);
|
SetWindowLongPtrW(Info->hEdit, GWLP_USERDATA, (LONG_PTR)Info);
|
||||||
SetWindowLongW(Info->hPreview, GWLP_USERDATA, (LONG)Info);
|
SetWindowLongPtrW(Info->hPreview, GWLP_USERDATA, (LONG_PTR)Info);
|
||||||
|
|
||||||
InitToolbox(Info);
|
InitToolbox(Info);
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ EditGlyphEditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PEDIT_GLYPH_INFO Info;
|
PEDIT_GLYPH_INFO Info;
|
||||||
|
|
||||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
|
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
|
||||||
|
|
||||||
if(Info)
|
if(Info)
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@ EditGlyphPreviewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PEDIT_GLYPH_INFO Info;
|
PEDIT_GLYPH_INFO Info;
|
||||||
|
|
||||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
|
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
|
||||||
|
|
||||||
if(Info)
|
if(Info)
|
||||||
{
|
{
|
||||||
|
|
|
@ -250,7 +250,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PFONT_WND_INFO Info;
|
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)
|
if(Info || uMsg == WM_CREATE)
|
||||||
{
|
{
|
||||||
|
@ -258,7 +258,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
Info = (PFONT_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
|
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
|
// Set a fixed window size
|
||||||
SetWindowPos(hwnd, NULL, 0, 0, FONT_BOXES_WND_WIDTH, FONT_BOXES_WND_HEIGHT, SWP_NOZORDER | SWP_NOMOVE);
|
SetWindowPos(hwnd, NULL, 0, 0, FONT_BOXES_WND_WIDTH, FONT_BOXES_WND_HEIGHT, SWP_NOZORDER | SWP_NOMOVE);
|
||||||
|
|
|
@ -99,7 +99,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PFONT_WND_INFO Info;
|
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)
|
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 = (PFONT_WND_INFO)( ( (LPMDICREATESTRUCT) ( (LPCREATESTRUCT)lParam )->lpCreateParams )->lParam );
|
||||||
Info->hSelf = hwnd;
|
Info->hSelf = hwnd;
|
||||||
|
|
||||||
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
|
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
|
||||||
|
|
||||||
CreateFontBoxesWindow(Info);
|
CreateFontBoxesWindow(Info);
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
PMAIN_WND_INFO Info;
|
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)
|
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 = (PMAIN_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
|
||||||
Info->hMainWnd = hwnd;
|
Info->hMainWnd = hwnd;
|
||||||
Info->hMenu = GetMenu(hwnd);
|
Info->hMenu = GetMenu(hwnd);
|
||||||
SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
|
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
|
||||||
|
|
||||||
hNextClipboardViewer = SetClipboardViewer(hwnd);
|
hNextClipboardViewer = SetClipboardViewer(hwnd);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ CListNode::CListNode(PVOID element, CListNode *next, CListNode *prev)
|
||||||
Prev = prev;
|
Prev = prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CListNode::operator new(/*size_t*/ UINT size)
|
void* CListNode::operator new(size_t size)
|
||||||
{
|
{
|
||||||
PVOID p;
|
PVOID p;
|
||||||
if (hHeap == NULL) {
|
if (hHeap == NULL) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ public:
|
||||||
CListNode();
|
CListNode();
|
||||||
CListNode(VOID *element, CListNode *next, CListNode *prev);
|
CListNode(VOID *element, CListNode *next, CListNode *prev);
|
||||||
~CListNode() {};
|
~CListNode() {};
|
||||||
void* operator new(/*size_t s*/ UINT s);
|
void* operator new(size_t s);
|
||||||
VOID operator delete(void* p);
|
VOID operator delete(void* p);
|
||||||
|
|
||||||
VOID SetElement(PVOID element);
|
VOID SetElement(PVOID element);
|
||||||
|
|
|
@ -442,7 +442,7 @@ NTSTATUS TdiQueryAddress(
|
||||||
if (SnmpInfo.NumAddr != 1)
|
if (SnmpInfo.NumAddr != 1)
|
||||||
{
|
{
|
||||||
/* Skip loopback address */
|
/* 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
|
else
|
||||||
{
|
{
|
||||||
|
@ -507,7 +507,7 @@ NTSTATUS TdiSendDatagram(
|
||||||
RtlZeroMemory(ConnectInfo, sizeof(TDI_CONNECTION_INFORMATION) + sizeof(TA_IP_ADDRESS));
|
RtlZeroMemory(ConnectInfo, sizeof(TDI_CONNECTION_INFORMATION) + sizeof(TA_IP_ADDRESS));
|
||||||
|
|
||||||
ConnectInfo->RemoteAddressLength = 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 = (PTA_IP_ADDRESS)(ConnectInfo->RemoteAddress);
|
||||||
TA->TAAddressCount = 1;
|
TA->TAAddressCount = 1;
|
||||||
|
@ -630,9 +630,9 @@ NTSTATUS TdiReceiveDatagram(
|
||||||
ReceiveInfo->RemoteAddressLength = 0;
|
ReceiveInfo->RemoteAddressLength = 0;
|
||||||
ReceiveInfo->RemoteAddress = NULL;
|
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->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 = (PTA_IP_ADDRESS)(ReturnInfo->RemoteAddress);
|
||||||
ReturnAddress->TAAddressCount = 1;
|
ReturnAddress->TAAddressCount = 1;
|
||||||
|
|
|
@ -317,7 +317,7 @@ VOID ParseCommandLine(LPWSTR szCmdLine, UCHAR *chOption, HWND *hwndParent)
|
||||||
if(isdigit(ch))
|
if(isdigit(ch))
|
||||||
{
|
{
|
||||||
unsigned int i = _wtoi(szCmdLine - 1);
|
unsigned int i = _wtoi(szCmdLine - 1);
|
||||||
*hwndParent = (HWND)i;
|
*hwndParent = (HWND)(ULONG_PTR)i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*hwndParent = NULL;
|
*hwndParent = NULL;
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ GetModuleEntryPoint (
|
||||||
PIMAGE_OPTIONAL_HEADER poh = (PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET (lpFile);
|
PIMAGE_OPTIONAL_HEADER poh = (PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET (lpFile);
|
||||||
|
|
||||||
if (poh != NULL)
|
if (poh != NULL)
|
||||||
return (LPVOID)(ULONG_PTR)(poh->AddressOfEntryPoint);
|
return (LPVOID)(poh->AddressOfEntryPoint);
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
<library>ntdll</library>
|
||||||
<file>pedump.c</file>
|
<file>pedump.c</file>
|
||||||
<file>pedump.rc</file>
|
<file>pedump.rc</file>
|
||||||
|
|
|
@ -47,7 +47,7 @@ void *PsaiMalloc(SIZE_T size)
|
||||||
NtCurrentProcess(),
|
NtCurrentProcess(),
|
||||||
&pBuf,
|
&pBuf,
|
||||||
0,
|
0,
|
||||||
(PULONG)&size,
|
&size,
|
||||||
MEM_COMMIT,
|
MEM_COMMIT,
|
||||||
PAGE_READWRITE
|
PAGE_READWRITE
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,7 @@ void *PsaiMalloc(SIZE_T size)
|
||||||
|
|
||||||
void PsaiFree(void *ptr)
|
void PsaiFree(void *ptr)
|
||||||
{
|
{
|
||||||
ULONG nSize = 0;
|
size_t nSize = 0;
|
||||||
|
|
||||||
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
|
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ ProcessHasDescendants (
|
||||||
if (NULL == pInfo) return 0;
|
if (NULL == pInfo) return 0;
|
||||||
do {
|
do {
|
||||||
|
|
||||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
|
||||||
{
|
{
|
||||||
if ((Pid != (HANDLE)pInfo->UniqueProcessId) && (Pid == (HANDLE)pInfo->InheritedFromUniqueProcessId))
|
if ((Pid != (HANDLE)pInfo->UniqueProcessId) && (Pid == (HANDLE)pInfo->InheritedFromUniqueProcessId))
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ PrintProcessAndDescendants (
|
||||||
/* Scan and print possible children */
|
/* Scan and print possible children */
|
||||||
do {
|
do {
|
||||||
|
|
||||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
|
||||||
{
|
{
|
||||||
if (Pid == pInfo->InheritedFromUniqueProcessId)
|
if (Pid == pInfo->InheritedFromUniqueProcessId)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +236,7 @@ int WINAPI PrintProcessList (BOOL DisplayTree)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
|
||||||
{
|
{
|
||||||
PrintProcessAndDescendants (pInfo, pInfoBase, 0);
|
PrintProcessAndDescendants (pInfo, pInfoBase, 0);
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@ int WINAPI PrintProcess (char * PidStr)
|
||||||
CLIENT_ID ClientId = {0, 0};
|
CLIENT_ID ClientId = {0, 0};
|
||||||
|
|
||||||
|
|
||||||
ClientId.UniqueProcess = (PVOID) atol (PidStr);
|
ClientId.UniqueProcess = LongToPtr(atol (PidStr));
|
||||||
|
|
||||||
if (FALSE == AcquirePrivileges ())
|
if (FALSE == AcquirePrivileges ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<module name="tlist" type="win32cui" installbase="system32" installname="tlist.exe">
|
<module name="tlist" type="win32cui" installbase="system32" installname="tlist.exe">
|
||||||
<library>epsapi</library>
|
<library>epsapi</library>
|
||||||
<!-- <library>tgetopt</library> -->
|
<!--library>tgetopt</library> -->
|
||||||
<library>user32</library>
|
<library>user32</library>
|
||||||
<library>ntdll</library>
|
<library>ntdll</library>
|
||||||
<file>tlist.c</file>
|
<file>tlist.c</file>
|
||||||
|
|
|
@ -75,14 +75,14 @@ AddExtension(LPTSTR ExtName,
|
||||||
PEXTENSION_INFO ExtInfo;
|
PEXTENSION_INFO ExtInfo;
|
||||||
PEXTENSION_INFO Info;
|
PEXTENSION_INFO Info;
|
||||||
TCHAR *t;
|
TCHAR *t;
|
||||||
DWORD ln;
|
size_t ln;
|
||||||
|
|
||||||
ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO));
|
ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO));
|
||||||
if (!ExtInfo)
|
if (!ExtInfo)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
|
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
|
||||||
ln = (DWORD)t - (DWORD)ExtName;
|
ln = t - ExtName;
|
||||||
|
|
||||||
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
|
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
|
||||||
memcpy (ExtInfo->ExtName, ExtName, ln);
|
memcpy (ExtInfo->ExtName, ExtName, ln);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue