|
Hi! I'm using TWAIN 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!
|
|
|
|
|
ilidan wrote: 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?
There should be some kind of documentation to explain the parameters!
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
please ,
how i can solve this problem ..........................
The output of this segment code must be .... ( 7 )
where base = 7 , power 3 , mod = 33
i write this code to find this formula when the number is too big
result = pow( base , power ) % mod
long MODLD( long base , long power , long mod )
{
long result = base ;
long i = power ;
if( i % 2 != 0 )
{
i-- ;
}
for( ; i > 1 ; )
{
result = ( result * result ) % mod ;
// cout<
|
|
|
|
|
shereem khaleel wrote: The output of this segment code must be .... ( 7 )
std::cout << 7 << std::endl;
bad joke... I know.
Maxwell Chen
|
|
|
|
|
7^3 = 343
343/33 = 10.393939393939393939393939393939
(10.393939393939393939393939393939-10)*33 = 13
Now to verify
10*33 + 13 = 343
The result should be 13 not 7.
Steve
|
|
|
|
|
anybody knw how to add a code that calculates the total time taken for execution...for example...
show current time before process starts...and show the end time when process done..
|
|
|
|
|
Check out the GetProcessTimes API.
Steve
|
|
|
|
|
any other ways...this one not suitable..
because..its just to show in the text file....the starting time and end time..
|
|
|
|
|
Why isn't it suitable?
Steve
|
|
|
|
|
1)Get the system time when you start the process
2)Get the system time when you end the process
Take the difference between the two times and what you get is the total time that your process takes to execute.
For me CAR is Challenge, Achievement and Recognition.
_AnShUmAn_
|
|
|
|
|
use GetTickCount() function.
Call the function at the begining of the process and at the end of the process.
Take the difference..
It will return the time taken by the process
Another way is to enable the profil.. in the VC++ IDE...
nave
|
|
|
|
|
how to enable profile in the VC++ ide...
|
|
|
|
|
I ve Got it..thank u for everyone..who helped me..
|
|
|
|
|
|
haha...by calculatin start time and end time...
|
|
|
|
|
makaveli_07 wrote: haha...by calculatin start time and end time...
ROTFLMAO Finally...
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: ROTFLMAO
What does that mean?
nave
|
|
|
|
|
Naveen R wrote: Maxwell Chen wrote:
ROTFLMAO
What does that mean?
Let me try...
Rolling On The Floor Laughing My Off
Nibu thomas
Software Developer
Faqs by Michael dunn
-- modified at 3:22 Tuesday 9th May, 2006
|
|
|
|
|
Nibu thomas wrote: ROTFLMAO
I thought it is "Rolling On The Floor Laughing My Off".
BTW, can anyone explain the syntax ?!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: I thought it is "Rolling On The Floor Laughing My Off".
What are you talking about? :->
PS: Don't forget to quote the message next time;P
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Nibu thomas wrote: Don't forget to quote the message next time
Maxwell Chen
|
|
|
|
|
|
It looks like kind of recursive logic when we read back our posts to each others ...
Maxwell Chen
|
|
|
|
|
Hi,
I use an owner draw menu (handling WM_MEASUREITEM, WM_DRAWITEM, WM_MENUSELECT, WM_MENUCHAR messages).
Under MFC, if you use a popup menu with several menu items
(for example: recent files), two automatic menu scroll button appear on the top and the bottom of the list.
These buttons appear when there isn't enough place on the screen to display the menu items.
How can i change the default drawing of this buttons?
-- modified at 6:20 Tuesday 9th May, 2006
|
|
|
|
|
Hi, i have a text Box in my form.
mu aim is to force the user to type just numbers in that textBox.But i dont know how to do that.
So some plz could help me?
i Use the MFC.
thank you.
|
|
|
|