|
When is called AfxOleInit() anywhere in application (is standard in VS 7) then by the closing application this fallen. When I used WIA driver (e.g. aquire image from scanner), then all is OK, but by the closing main application this fallen:
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1); <<<<<<<< error is here (m_dwRef == 2)
#endif
#ifdef _AFXDLL
m_pModuleState = NULL;
#endif
}
I don't know why is m_dwRef == 2 and therefore my application fallen...
Edit/Delete Message
|
|
|
|
|
I need to disable WIA driver (it is service under Windows XP).
Can you tell me how do it? I know do it, but only by means control panel (Start), but I need to disable it in source code (Visual C++).
Please, help me.. Thanks
|
|
|
|
|
I could not find 'iphlpapi.h' and 'iphlpapi.lib' installed anywhere in my computer. How do I get these files?
|
|
|
|
|
Install Platform SDK
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
|
CMap < CString,CString,Info, Info >m_Map2;
I am not able execute the above statement. Info is a user defined structure.
The Error is "error C2440: 'type cast' : cannot convert from 'class CString' to 'unsigned long'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"
Please specify how i can create CMap with CStringas a key.
|
|
|
|
|
u should do it like this
CMap< CString,LPCTSTR,int,int> m_Map2;
nave
|
|
|
|
|
I'm looking on how I could do to change the tooltip text of my application that appears in Windows taskbar. Something like IE does to reflect the currently displayed web page.
Is there an API function to do so, or is is tricky ?
Any help would be appreciated,
thanks
Yarp
http://www.senosoft.com/
|
|
|
|
|
change the text in the title bar of the window. The tooltip will change accordingly..
nave
|
|
|
|
|
Thanks, after all that was not so tricky
Yarp
http://www.senosoft.com/
|
|
|
|
|
but I think IE do so..:->
nave
|
|
|
|
|
i have to call a function aoutomatically at the time of first object creation. is there any way for this please reply me
|
|
|
|
|
Hello,
what kind of application you have? If is dialog based, you can cal your function before dialog is
showed, in OnInitDialog()!
example:
<br />
BOOL CMyDialog::OnInitDialog()<br />
{<br />
<br />
<br />
MyFunction();<br />
<br />
return TRUE;<br />
}<br />
<br />
hope this can help you?<br />
regards<br />
break;
|
|
|
|
|
create a mutex
if the mutex creation was success then call the function in the constructor
RinuRaj
|
|
|
|
|
Could you be more specific ? At which time exactly do you need to call your function ? What does 'at the start of the application' mean ? Before you enter the main ?
If this is the case, you can use a little trick: use static variables in order to call your function. Static variables are evaluated at the startup of your program (before main gets executed). So, doing something like that:
static int Value = MyFunction();
Lets you call MyFunction before main gets called. Of course it needs to return an integer.
|
|
|
|
|
Thanx a lot from me for this trick!
Only one question, in dialog based projects, where is the best place to create this,
in application class??
regards
break;
|
|
|
|
|
Did you understand my post ? Because it doesn't look like... A static variable in this case will need to be global of course. Otherwise it won't work (cause if it is local to a function, it is evaluated only the first time the function is entered).
Do you really need to do this before the main gets executed ? Won't it work if you put the code in OnInitDialog ? What do you need to do exactly ?
|
|
|
|
|
Cedric Moonen wrote: Static variables are evaluated at the startup of your program (before main gets executed).
As are global objects in general.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In the title you say "at the time of start the application", and in the content - "at the time of first object creation"; they are not the same...
Keep a static class variable of type bool and check whether it is false in the constructor. If so, the first object is being created (now set it true), otherwise - not the first one.
--
======
Arman
|
|
|
|
|
Hi,
I am trying to execute .Net 2005 executable in Test PC.It's not executing and giving an error message "The application has failed to start because the application configuration is incorrect. re-install the application and fix the problem"
Do we need to install any framework or service packs in Test PC? Please help me.
thanks & regards,
Narasimharao
knarasimharao
|
|
|
|
|
K. narasimharao wrote: Do we need to install any framework or service packs in Test PC
I think so. You should install at least Framework 2.0 redistributable package
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
I want to apply security attributes for my application so that it cannot be killed from Task Manager. So how to use security attributes to CreateProcess function.
Thanks in advance
--
======
Arman
|
|
|
|
|
Hi All,
I am useing EVC++ 4 for PocketPC.
Can I use CDialog in CPropertyPage?
regards,
Divyang Mithaiwala
|
|
|
|
|
Divyang Mithaiwala wrote: Can I use CDialog in CPropertyPage?
CPropertyPage is derived from CDialog .
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
We have converted .net 2003 application(developed in vc++.net) to .net 2005. But the exe built in .net 2005 is not executing in .net 2003 environment. It is showing error that "initialization required to execute this application and rebuilding the application will fix problem".
To execute that .net 2005 exe under .net 2003 environment do we need to have any frame work or service packs?
Thanks in Advance
|
|
|
|