Home › Forums › TWAIN Classic › NULL parameter to DSM_Entry
- This topic has 0 replies, 1 voice, and was last updated 17 years, 10 months ago by anjin.
- AuthorPosts
Hi! I’m using TWAIN (with Visual C++ on Visual Studio 2005) to interface with a scanner. The function DSM_Entry is accessed via a loaded DLL, TWAIN_32.DLL:
m_hTwain = LoadLibrary(_T(“TWAIN_32.DLL”));
m_DSMEntryProc = (DSMENTRYPROC)GetProcAddress(m_hTwain, (LPCSTR)MAKEINTRESOURCE(1));I then call the procedure using:
TW_UINT16 nRes =(*m_DSMEntryProc)(&m_appID, pDest, dg, dat, msg, pData);
however, some calls need for pDest to be null, (like the triplet DG_CONTROL / DAT_IDENTITY / MSG_USERSELECT for those who know TWAIN).
Unfortunately,when pDest is null for this call, an access violation appears. For other triplets, the call is OK. Has anyone encountered this before? Am I passing “NULL” the wrong way?
Thanks!
- AuthorPosts