|
|
Hi
I went through to the given link and using following code
<br />
IImnAccountManager *m_pAccountManager;<br />
HRESULT hr = CoCreateInstance(CLSID_ImnAccountManager, NULL, CLSCTX_SERVER, <br />
IID_IImnAccountManager, (LPVOID*) &m_pAccountManager);<br />
if(FAILED(hr)) <br />
{<br />
MessageBox(_T("Error creating IImnAccountManager."), _T("Demo Error"));<br />
EndDialog(1);<br />
return FALSE;<br />
}<br />
<br />
<br />
<br />
m_pAccountManager->Init(NULL);<br />
<br />
<br />
ACCTTYPE acct;<br />
ULONG ulAccounts;<br />
m_pAccountManager->GetAccountCount(acct,&ulAccounts);<br />
but after last line it gives error
"Unhandled Exception in Demo.exe(MSOEACCT.DLL)0xC0000005 Access Violation."
So please tell me that how can I remove this error.
Thanks
|
|
|
|
|
After stroking SHIFT key five times, one dialog pops up to notify if to enable the sticky keys.
Do you know some way to disalbe this function and let it not shown when stroking the SHIFT key?
Thanks in advance!
|
|
|
|
|
Go to Control Panel->Accessiblity Options->KeyBoard tab
Uncheck -> (Use StickyKeys)
Click the corresponding Settings button of the settings section.
UnCheck -> (Use ShortCut)
That's it.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have known that way, however, implementing it by progamming is my favorate.
Have you other ways, by means of coding or offer an API function?
Such as in WinCE(Only my program need run in windows XP):
===============================
STICKYKEYS skf;
BOOL bSuccess;
// Fill in the members of the STICKYKEYS structure.
skf.cbSize = sizeof(STICKYKEYS);
skf.dwFlags = (SKF_AVAILABLE | SKF_STICKYKEYSON | SKF_AUDIBLEFEEDBACK);
// Call SystemParametersInfo with the SPI_SETSTICKYKEYS flag.
bSuccess = SystemParametersInfo(SPI_SETSTICKYKEYS, sizeof(STICKYKEYS), (LPVOID) &skf, 0);
-- modified at 6:34 Monday 21st November, 2005
|
|
|
|
|
Hey I thought you wanted to do it the other way round.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I guess, to modify the code could bring into effect...
Plus, to check/uncheck the option may be implemented by an API function, for it seems like a block..
Stroking five times can activate the dialog, is there some service on guard? So if to configure something can make the dialog inactive all along?
-- modified at 10:15 Monday 21st November, 2005
|
|
|
|
|
Hi all ,
Please help me out with this one.
I have made a Dialog-based app (MyDialog). I added a class of my own(MyClass) to this application.
MyDialog uses MyClass. So i did a #include "MyClass.h" in MyDialog.cpp
Later on i realised that MyClass requires MyDialog class. So i did a #include "MyDialog.h" in MyClass.cpp.
Now when i compile, i get an "Undelcared Identifier" error at:
enum {IDD = IDC_MY_DIALOG};
I tried changing the locations of the #include to all possible places (including StdAfx.h).
Please help me out everyone. Am i missing anything???? How should i include the headers when two files are interdependent.
Thanks in advance!
*** Who said nothing is impossible? I have been doing it since a long time ***
|
|
|
|
|
Hello.
You can use the concept of "forward declaration". That is: You just declare the class in one of the header files, for instance, in MyDialog.h:
class MyClass;
class MyDialog ... {
....
};
Kakan
|
|
|
|
|
Hi Kakan,
Thanks for the quick reply.
I think i have tried a forward declaration earlier.
But let me double check if i had done it correctly.
So, should i make forward declaration in both the files for the other class.
Like:
MyDialog.h
class MyClass<br />
class MyDialog<br />
{<br />
....<br />
};
and then
MyClass.h
class MyDialog;<br />
class MyClass<br />
{<br />
....<br />
};
Should i continue to include the header files in each of the file as i have been doing?
In MyClass, i dont require to make MyDialog object a member. i am just using it in one of the functions of MyClass.
Please reply.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hello, and I'm sorry for the delay. I'm at work, you know and I have to make a living too...
This situation really isn't very easy to get going, but it is possible.
Try this:
In MyDialog.h:
class MyClass;
class MyDialog
{
....
};
In MyDialog.cpp:
#include "MyDialog.h"
#include "MyClass.h"
And make sure that each of the h-files can be included just once.
I.e:
#ifndef MY_DIALOG_H
#define MY_DIALOG_H
... definition of MyDialog
#endif
|
|
|
|
|
Well Kakan,
i dont have the code with me right now.
I'll try it out and tell you tomorrow.
Thanks a lot for the help.
I'll contact you tomorrow.
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
OK. I'm using the trial and error-method when I have to get a construct like this to compile.
It gets a lot of errors...
Good luck.
Kakan
|
|
|
|
|
Hi Kakan,
It was just a silly fault on my part.
i am extremely sorry about the whole matter.
During the initial phase, i had commented out the resource.h file.
Moreover, i had declared one function in MyClass.h but forgot to define it in MyClass.cpp. That gave a linker error and showed the mangled names of the function. Since the names were not so clear, i skipped reading it everytime.
Yesternight, i looked more closely to the error and read each line of it then realised my mistake.
No forward declaration was required. I created another simple C++ project and simulated the same situation, but it worked out.
Thanks for all the help.
And, sorry that i bothered you.
Thanks a lot!
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
;);)
As the Aussies would put it: No worries mate!
Problem solved, that's the main thing.
And you've learnt your lesson. IMO, it's the knowledge that comes the hard way, that's stick to ones mind.
Keep on going!
|
|
|
|
|
Hi,
try including resource.h in myclass.cpp. Hope it works.
Bye
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hi Cool Ju,
thanks for your help.
I tried that too. But the problem is not solved by that.
I think Kakan is right. It must be something related to forward declaration.
Please tell me if you have any idea regarding that.
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi,
Where did u added. Add in CMyclass.cpp ie where u added the CMyDialog.h
Its working for me.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Well, i dont have the code with me right now...
I'll try it and tell you tomorrow.
Thanks a lot, man. Thanks for the help.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi Cool Ju,
It was just a silly fault on my part.
i am extremely sorry about the whole matter.
During the initial phase, i had commented out the resource.h file.
Moreover, i had declared one function in MyClass.h but forgot to define it in MyClass.cpp. That gave a linker error and showed the mangled names of the function. Since the names were not so clear, i skipped reading it everytime.
Yesternight, i looked more closely to the error and read each line of it then realised my mistake.
Thanks for all the help.
And, sorry that i bothered you.
Thanks a lot!
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
I think IDC_MY_DIALOG ist not defined.
Did you include resource.h in your Source ?
Is there a Dialog with this ID in your resource ?
|
|
|
|
|
HI Karle,
Thanks for the help.
I had commented out "resource.h" in "stdafx.h"
Moreover, i forgot to define a function which i had declared in the header file. The linker error was so confusing that i wasn't able to understand the actual problem.
Now its working...
Thanks for the help.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi guys,
When I try to link a DLL I get this error message.
Cannot Find TestDLL even with argument lookup.
TestDLL is a function defined in the dll.
I am a newbie to DLL. I have done it in other languages but not in VC. Can somebody tell me how to go about this.
Also kindly tell me the basic steps for working with a DLL.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi,
How r u linking the dll (explicitly - lib or implicitly - run time loading)
Check this[^] for tutorials
Bye
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Runtime linking
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|