|
It would be best to post this question in the Discussion list at the end of the article page.
|
|
|
|
|
In that case, only article writer may give the answer. But what if I want answer from other peoples like you. You post excellent answers here and if I post this question in Article-Discussion then I will not be able to get answers from you and other people's who have a great solution and mind.
Please give answer here.
|
|
|
|
|
Why I said that was because, the author has written the code and he/she would be inquisitive as to why it does not work in a newer OS.
I'm not discouraging you from posting in the general forums.
|
|
|
|
|
Thanks I posted in that article.
My problem has been solved. This was a silly mistake. Actually parent node was expanding in win7 also but that parent node was also having another parent node which I was not expanding and I was thinking that nothing is getting expand. I should recursively expand all it's parent nodes
Regards,
Rahul Kulshreshtha
|
|
|
|
|
Are you saying there was a difference how this was handled in XP and Win7?
|
|
|
|
|
No!!! Actually my XP machine was having a Tree with only two level and my Win7 machine was having Tree with 4 level of data.
I was expanding only parent folder of some node(detected by some rules) so in windows XP, I was able to see changes while in Win7 it was expanding parent folder of some node(detected by some rules) but as the detected node was on 4th level of tree so only it's parent (3rd level node) was getting expand. 2nd level and 1st level node was not getting expand because I was not expanding them. So I changed my logic to expand all parent in hierarchy and that worked
|
|
|
|
|
Well, that's a relief.
|
|
|
|
|
rahul.kulshreshtha wrote: In that case, only article writer may give the answer.
Not true. Anyone may answer.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hello,
I am getting this error :
0x80040154 Class not registered
I already done regsvr32 for the C++ dll file.
When I check the registry, I can find the entry at HKEY_CLASSES_ROOT\CLSID.
InProcServer32 has the dll path as the default while threading model is Apartment.
When I run the client software, it fails with Class not registered error.
Your guidance on solving this problem is very much appreciated.
Thanks,
Goutam
|
|
|
|
|
How are you loading the COM component?
Are you certain that you called CoInitialize ?
|
|
|
|
|
Thank you for trying to help me.
Yes. I am loading the COM component.
The returned values are as below :
hr_init = S_OK.
hr_init2 = Class not registered
I called the CoInitialize as below :
HRESULT hr_init = CoInitialize(NULL);
if (FAILED(hr_init))
{
return E_FAIL;
}
CLSID CLSID_EventFiringObject_Tmp;
CLSID_EventFiringObject_Tmp = __uuidof(IEventFiringObject_OD);
// ***** Create an instance of an object which implements IEventFiringObject. *****
// HRESULT hr_init2 = m_spIEventFiringObject.CreateInstance(__uuidof(IEventFiringObject_OD));
HRESULT hr_init2 = m_spIEventFiringObject.CreateInstance(CLSID_EventFiringObject_Tmp);
if (FAILED(hr_init2))
{
return E_FAIL;
}
// ***** Instantiate an IEventFiringObjectEventHandler object. *****
m_pIEventFiringObjectEventHandler = new IEventFiringObjectEventHandler(*this, m_spIEventFiringObject, &CManualTest::OnEventFiringObjectInvoke);
|
|
|
|
|
HRESULT hr_init2 = m_spIEventFiringObject.CreateInstance(__uuidof(IEventFiringObject_OD)); In the above line, the parameter of __uuid must be the coclass name and not the interface name.
|
|
|
|
|
Thank you. It solved the problem.
A new error came up as below :
0x80040111 ClassFactory cannot supply requested class
I hope you can guide me with this too.
|
|
|
|
|
|
To me this suggests that the class-id is registered in the registry but the server doesn't recognise it.
Steve
|
|
|
|
|
I have below codes in the dll file. Is this enough to return the requested class factory?
CODModule _AtlModule;
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}
I have this in the def file :
EXPORTS
DllGetClassObject PRIVATE
modified on Thursday, July 8, 2010 2:08 AM
|
|
|
|
|
please tel me where i start my task,i have learn some articles but i can't find the way,where i started my task any body have helping material.
|
|
|
|
|
Please try rewording your question as it is not clear what you are trying to do.
It's time for a new signature.
|
|
|
|
|
ok plz tel me how to read MBR of FAT drive, i m working in eclipse C++.and after this what can i do next,reading FAT table or directory of FAT.
|
|
|
|
|
Take a look here[^] for some information from Microsoft.
It's time for a new signature.
|
|
|
|
|
Hi!
I've to remove the whitespace character from a string. My String is of type stringw .
It's type defed as typedef string<wchar_t> stringw; . I've declared a string
as follows:
stringw& country;
I'm passing it as a function argument. Inside the function I need the exact value(not including the white space
at the end) of the string. How to remove a white space at the end of a string?
|
|
|
|
|
Are you defining a string class of your own?
If not, this is the wrong syntax.
If you're looking to use the stl string , there is already a predefined type called wstring that represents wide strings.
Here are the trim_left and trim_right versions for wstring -
std::wstring trim_right(const std::wstring& str)
{
return str.substr(0, str.find_last_not_of(L' ') + 1);
}
std::wstring trim_left(const std::wstring& str)
{
size_t st = str.find_first_not_of(L' ');
return str.substr(st, str.size() - st);
}
|
|
|
|
|
If I recall correctly from your previous questions, most of the classes you are using are from the Irrlicht (whatever that may be) library. I would suggest you consult the class documentation to see what functions it provides.
It's time for a new signature.
|
|
|
|
|
for example there is a four bits integer 1122, if someone guess and inout 1234, because 1 and 2 are in 1122, and the position is same, the computer will tell you that you are right with two numbers and they are 1 and 2;
as follows is my program, I thinnk they are too complex , could some tell me a simple algorithm, thinks in advantage
#include <stdio.h><br />
#include <stdlib.h><br />
<br />
int main()<br />
{<br />
int data1 = 1234;<br />
int data2;<br />
int gewei1, shiwei1, baiwei1, qianwei1;<br />
int gewei2, shiwei2, baiwei2, qianwei2;<br />
int count = 0;<br />
<br />
gewei1 = data1%10;<br />
shiwei1 = (data1%100)/10;<br />
baiwei1 = (data1%1000)/100;<br />
qianwei1 = data1 /1000;<br />
<br />
int arr1[4] = {qianwei1, baiwei1, shiwei1, gewei1};<br />
<br />
printf("Please Enter a interger:");<br />
scanf("%d", &data2);<br />
<br />
gewei2 = data2%10;<br />
shiwei2 = (data2%100)/10;<br />
baiwei2 = (data2%1000)/100;<br />
qianwei2 = data2 /1000;<br />
int arr2[4] = {qianwei2, baiwei2, shiwei2, gewei2};<br />
<br />
for (int i=0; i<4; i++)<br />
{<br />
if(arr1[i] == arr2[i])<br />
{<br />
printf("%d ", arr1[i]);<br />
count++;<br />
}<br />
else<br />
continue;<br />
}<br />
printf("the same number is %d ", count);<br />
return 0;<br />
}
|
|
|
|
|
wbgxx wrote: for example there is a four bits integer 1122, if someone guess and inout 1234, because 1 and 2 are in 1122, and the position is same
The position is NOT the same, actually.
wbgxx wrote: I thinnk they are too complex , could some tell me a simple algorithm
You may make it more concise, anyway, since the current logic looks correct I doubt it would be simpler.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|