www.digitalmars.com         C & C++   DMDScript  

D - D language, Unhandled exception...

Hi! I like make programs in Visual Studio (2010). 2 days ago i
want build dll, and when I build default program:


module dllmain;

import std.c.windows.windows;
import core.sys.windows.dll;

__gshared HINSTANCE g_hInst;

extern (Windows)
BOOL DllMain(HINSTANCE hInstance, ULONG ulReason, LPVOID
pvReserved)
{
      final switch (ulReason)
      {
	case DLL_PROCESS_ATTACH:
	    g_hInst = hInstance;
	    dll_process_attach( hInstance, true );
	    break;

	case DLL_PROCESS_DETACH:
	    dll_process_detach( hInstance, true );
	    break;

	case DLL_THREAD_ATTACH:
	    dll_thread_attach( true, true );
	    break;

	case DLL_THREAD_DETACH:
	    dll_thread_detach( true, true );
	    break;
      }
      return true;
}


My computer sent this error:


Unhandled exception at 0x0040434f in DynamicLib1_test_DDD.dll:
0xC0000005: Access violation reading location 0x00000000.

What I must make???
Aug 21 2012