// calls the DDProtCheck function in the appropriate DLL public static int DDProtCheck(DRIS dris, byte[] data) { int ret_code = -1; if (IntPtr.Size == 4) { try { ret_code = DDProtCheck32.DDProtCheck(dris, data); } catch (DllNotFoundException) { MessageBox.Show("Error! Cannot find dpwin32.dll. This should be in the same folder as DllTest.", "Sample", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { try { ret_code = DDProtCheck64.DDProtCheck(dris, data); } catch (DllNotFoundException) { MessageBox.Show("Error! Cannot find dpwin64.dll. This should be in the same folder as DllTest.", "Sample", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } return(ret_code); }
// calls the DDProtCheck function in the appropriate DLL public static int DDProtCheck(DRIS dris, byte[] data) { int ret_code = -1; if (IntPtr.Size == 4) { try { ret_code = DDProtCheck32.DDProtCheck(dris, data); } catch (DllNotFoundException) { Console.WriteLine("Error! Cannot find dpwin32.dll. This should be in the same folder as DllTest."); } } else { try { ret_code = DDProtCheck64.DDProtCheck(dris, data); } catch (DllNotFoundException) { Console.WriteLine("Error! Cannot find dpwin64.dll. This should be in the same folder as DllTest."); } } return(ret_code); }