GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Don't use "static const <type>", breaks on MSVC. · coderup2u/MemoryModule@d9dcc0e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • MemoryModule.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎MemoryModule.c‎

Copy file name to clipboardExpand all lines: MemoryModule.c
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@
4848
#define IMAGE_SIZEOF_BASE_RELOCATION (sizeof(IMAGE_BASE_RELOCATION))
4949
#endif
5050

51+
#ifdef _WIN64
52+
#define HOST_MACHINE IMAGE_FILE_MACHINE_AMD64
53+
#else
54+
#define HOST_MACHINE IMAGE_FILE_MACHINE_I386
55+
#endif
56+
5157
#include "MemoryModule.h"
5258

5359
typedef BOOL (WINAPI *DllEntryProc)(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved);
@@ -525,11 +531,6 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data, size_t size,
525531
return NULL;
526532
}
527533

528-
#ifdef _WIN64
529-
static const int HOST_MACHINE = IMAGE_FILE_MACHINE_AMD64;
530-
#else
531-
static const int HOST_MACHINE = IMAGE_FILE_MACHINE_I386;
532-
#endif
533534
if (old_header->FileHeader.Machine != HOST_MACHINE) {
534535
SetLastError(ERROR_BAD_EXE_FORMAT);
535536
return NULL;

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.