|
Hi!
I've to convert from iterator to unsigned int. How to do that?
|
|
|
|
|
Usually that makes no sense.
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]
|
|
|
|
|
But I need it. I've to compare the last element of an iterator with an unsigned int. Depending on the result of that comparission I've to call one function. How to convert or compare the last element of an iterator with an unsigned int?
I need this for the following code:
if(pWaypoint1 == (unsigned int)pContainer.end())
{
pWaypoint1 = 0;
mCharacter1->GoToWaypoint(pWaypoint1);
}
Above comparision is not working. How to compare?
|
|
|
|
|
You probably want to compare the content of the iterator to an unsigned int. If that's the case just access its contents using *:
if (pWaypoint1 == *iterator)
That is valid if your container is a container of unsigned int. By the way, you can't access the end() iterator of a container: it points after the last element so it is invalid.
|
|
|
|
|
That's a nonsense.
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]
|
|
|
|
|
T.RATHA KRISHNAN wrote: Above comparision is not working
and how can we know the error message ?
man, if you don't give us the infos, we're not able to help you...
|
|
|
|
|
T.RATHA KRISHNAN wrote: I've to convert from iterator to unsigned int
I doubt that.
show a piece of code of what you're trying to achieve please...
|
|
|
|
|
I need this for the following code:
<pre>if(pWaypoint1 == (unsigned int)pContainer.end())
{
pWaypoint1 = 0;
mCharacter1->GoToWaypoint(pWaypoint1);
}</pre>
Above comparision is not working. How to compare?
|
|
|
|
|
Hi,
How can i lauch the following window tool through programatically:
1.Open Recycele Bin
2. Empty Recycle Bin
3 Lauch Disk Management Tool
4. Launch Disk Cleaner Wizard
5. Lauch Fileserver Management
|
|
|
|
|
If I recall well, that's a repost.
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]
|
|
|
|
|
yes it is !
the worst is that he asks exactly the same question, when he got answers last time
|
|
|
|
|
Possibly he want to be sure.
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]
|
|
|
|
|
Must be urgentzzz
|
|
|
|
|
But then he forgot: "plz plz help!"
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
[Image resize DLL]
|
|
|
|
|
Could you give me first post answer, if posted?
|
|
|
|
|
As you should know there were answers to your original post [^] that gave at least hints for some of the required steps. What is the point in posting again and again the same list of questions?
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
[Image resize DLL]
|
|
|
|
|
MPTP wrote: 3 Lauch Disk Management Tool
ShellExecute(hWnd, "open", "diskmgmt.msc", ...);
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
i have made a setup and deployment project named "myTry1"
which contains "xyz.exe" at a location specified . the location is being asked in a GUI that starts when i click the setup icon generated in the Debug folder of "myTry1"
Requirement:
I donot need the GUI to appear as my final location/path is fixed.
I just need a command line based process instead of GUI(Graphical User Interface).
I am new to this topic "Set up and Deployment projects"
plz give suggestion as quickly as possible , i need it very quickly.
Thankyou!
kapardhi
|
|
|
|
|
Kapardhi : I got the solution thanks !
|
|
|
|
|
I am testing one application in vista platform and found that SetWindowsHookEx function fails in VISTA.
SetWindowsHookEx return NULL.
journalHook = SetWindowsHookEx(WH_JOURNALPLAYBACK, (HOOKPROC)WDChangeProc, hInst, 0);
Thanks in advance.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
from MSDN [^]:
Return Value
If the function succeeds, the return value is the handle to the hook procedure.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Anyway one may guess that elevation is needed there.
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]
|
|
|
|
|
|
Thanks Xing Chen,
I read this but not find any suitable solution but now my problem is solved by disabling UAC in Vista.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi all,
Please help me...
I am have written below function in which I am calling repeated as per my requirement..
typedef HRESULT (*PROCHICON)(HICON*);
typedef CString (*PROCCSTRNAME)();
typedef CString (*PROCCSTRCONT)(CString);
LoadButtonPluginDLL(CString DLLPath,CString &ButtonText,HICON &ImageHandle,CString &ButtonContent)
{
PROCHICON ProcButtonHicon;
PROCCSTRNAME ProcButtonName;
PROCCSTRCONT ProcButtonContent;
HINSTANCE hLib = ::LoadLibrary(DLLPath);
if(hLib==NULL)
{
MessageBox(_T("Fails To Load Dll"));
return;
}
ProcButtonHicon =(PROCHICON)::GetProcAddress(hLib,"GetButtonImage");
if(ProcButtonHicon == NULL)
{
::FreeLibrary(hLib);
CoUninitialize();
return;
}
ProcButtonName =(PROCCSTRNAME)::GetProcAddress(hLib,"GetButtonText");
if(ProcButtonName == NULL)
{
::FreeLibrary(hLib);
CoUninitialize();
return;
}
ProcButtonContent= (PROCCSTRCONT)::GetProcAddress(hLib,"GetPluginContent");
if(ProcButtonContent == NULL)
{
::FreeLibrary(hLib);
CoUninitialize();
return;
}
((PROCHICON)ProcButtonHicon)(&ImageHandle);
ButtonText =((PROCCSTRNAME)ProcButtonName)();
ButtonContent =((PROCCSTRCONT)ProcButtonContent)("1");
if(hLib)
FreeLibrary(hLib);
}
When I callabove function first time it works fine I get proper values in ImageHandle,ButtonText,ButtonContent from dll. but when I call this function second time and after calling FreeLibrary(hLib);variables ButtonText & ButtonContent become BadPtr and I can't use these values out side the function.
modified on Friday, August 1, 2008 4:47 AM
|
|
|
|
|
1. Please use code block button to surround code snippets with <pre> tags.
2. Why do you need to initialise COM library?
3. Why do you load the DLL and unload it inside your function body (overhead)?
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]
|
|
|
|