Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Shared Memory - Old References

Shared Memory - Old References

Scheduled Pinned Locked Moved C / C++ / MFC
helpvisual-studiosysadminwindows-adminperformance
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sweep123
    wrote on last edited by
    #1

    Using Shared Memory with a large structure, but when I start a new project using the current one as a basis, the names referenced in the structure are the old names and not the new names. If I type in the new names then All OK, but if I select old name from list error (as would expect). But how to arrange for the display of new structure items in the list. Is this an IDE bug or does the registry need a tidy up (and how). struct TSharedMemory{ .... .... }; // Try to create file mapping object for the data(assume that this is the server) g_hMap = ::CreateFileMapping((HANDLE) 0xFFFFFFFF, NULL, PAGE_READWRITE, 0, sizeof(TSharedMemory), "TP_SharedMem" ); if(g_hMap == NULL) { int s = GetLastError(); g_szFormatting.Format ("Shared Memory Not Obtained (Signals); Error = %d", s); AfxMessageBox(g_szFormatting); } else { // Obtain a pointer from the handle to file mapping object g_hMap = (TSharedMemory*)::MapViewOfFile(g_hMap,FILE_MAP_WRITE,0,0,sizeof(TSharedMemory)); // Clear down the current project saved setting structure memset(g_pMem, 0, sizeof(TSharedMemory)); } memcpy(&g_pMem->tips.buffer, &BCbuffer.data , sizeof(BCbuffer.data)); i.e. when you type &g_pMem-> its the old names that are shown.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups