In Vanishing on 7th Street, people disappear if they become engulfed in darkness.  At one point Paul is lying on the pool table and the kid went to the bathroom.  The lights flicker and Paul gets up.  He ends up finding his way into this tunnel.  When he reaches the end he looks back and all of the lights go out.  The kid goes back in and finds Paul missing.

What is the meanign of the tunnel scene?  It seems that it didn't actually happen, but I'm confused as to why it's included.


Question: C++: Access embedded resource from dll
Answer: As Manuell says, you use FindResource(), LoadResource() and probably LockResource() and SizeofResource()

I happen to have some code which does pulls out a resource and writes it to a file, and may help with your understanding of the API in question.

void WriteResourceToFile(
   HANDLE hFile,
   const _tstring &amp;resourceName,
   const _tstring &amp;resourceType,
   HMODULE hModule)
{
   HRSRC hResource = ::FindResource(
      hModule,
      resourceName.c_str(),
      resourceType.c_str());

   if (!hResource)
   {
      const DWORD lastError = ::GetLastError();

      throw CWin32Exception(
         _T("WriteResourceToFile() - FindResource"),
         lastError);
   }

   HGLOBAL hGlobal = ::LoadResource(hModule, hResource);

   if (!hGlobal)
   {
      const DWORD lastError = ::GetLastError();

      throw CWin32Exception(
         _T("WriteResourceToFile() - LoadResource"),
         lastError);
   }

   void *pData = ::LockResource(hGlobal);

   if (!pData)
   {
      const DWORD lastError = ::GetLastError();

      throw CWin32Exception(
         _T("WriteResourceToFile() - LockResource"),
         lastError);
   }

   const DWORD bytes = ::SizeofResource(hModule, hResource);

   DWORD bytesWritten = 0;

   if (!::WriteFile(hFile, pData, bytes, &amp;bytesWritten, 0))
   {
      const DWORD lastError = ::GetLastError();

      throw CWin32Exception(
         _T("WriteResourceToFile() - WriteFile"),
         lastError);
   }

   if (bytesWritten != bytes)
   {
      throw CWin32Exception(
         _T("WriteResourceToFile() - WriteFile"),
         _T("Wrote less bytes (") + ToString(bytesWritten) +
         _T("( than expected: ") + ToString(bytes));
   }
}