Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Unhandled Exception: Access Violation

Guru_AngadiGuru_Angadi Member Posts: 1
Hello Everyone,

Am working creating MFC DLL & am getting an error:Unhandled exception at 0x00000000 in Key_Testing.exe: 0xC0000005: Access violation.

The DLL Code is like this:

char* GetDiskSerialNumber (char g_DiskLetter);

char* DLLclass::GetDiskSerialNumber(char g_DiskLetter)
CHAR SN[64];

if(GetSerialNumber(SN,g_DiskLetter)){ // Error in this Line..
return (char*)SN;

This DLL am using in an application..
void CKey_TestingDlg::OnBnClickedgetserial()
// TODO: Add your control notification handler code here
DLLclass Dllobj;
char ltr='h';
char* ser=Dllobj.GetDiskSerialNumber(ltr);

Please,, Could anyone suggest where i gone wrong.. Any help will be appriciated..

Thank you.
Sign In or Register to comment.