|
This MAKELONG macro definition will work for you.
#include <string>
#define MYSTR "abc"
#define MAKELONG2(S) L##S
#define MAKELONG(S) MAKELONG2(S)
std::wstring a(MAKELONG(MYSTR));
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
great, thank you
I was trying just 1st macro before and I was getting the macro's name in my string
|
|
|
|
|
Yup - been there, done that
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
use
#define MYSTR _T("abc")
and then accordingly define (or not) the UNICODE symbol.
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]
|
|
|
|
|
Hi All,
i am using xmlhttp request method to get some xml data from server but i am not even able to create instance of xmlhttp object.
hr=pIXMLHTTPRequest.CreateInstance("Msxml4.XMLHTTP.4.0");
above hr is returning false. Please give some solution.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
It does NOT return false. It may return a failure code, usually useful to understand what happend.
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 exactly it returned some code...but hoe do i know its meaning....or can you please tell me the possible reasons of its failure
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: but hoe do i know its meaning....
See, for instance [^]. You may also try to post it here.
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]
|
|
|
|
|
actually false is 0 which is ERROR_SUCCESS
|
|
|
|
|
Actually it is not returning false it is returning some error code which i am not able to understand.....can you please tell me some reasons of failure of createinstance
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
You haven't posted the error number
Open WinError.h and search for "COM Error Codes" to see what does it mean.
Have you initialized the COM at program startup? That's my most frequent error when I use COM
|
|
|
|
|
yes i have seen its meaning and it says "invalid class string" but still i didnt find any solution..
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
then it is invalid string or you don't have that class registered in your system
|
|
|
|
|
Hello All,
I have posted this question in vista forum but not got any reply.
I am developing a network deployment application so first i am gathering OS information of remote nodes at network. i am able to find Windows XP, Windows server, Linux and Unix but i am unable to find finger print of windows vista for ettercap data base (Namp fingerprint) D'Oh! .
ettercap i am using for finger print detection.
Can anybody tell me where can i find windows vista fingerprint or if anybody know finger print please send me, it will be great help.
Thanks
Vikas
vicky
|
|
|
|
|
Hi all,
I have the following problem with an MFC application: in my app I have embedded internet explorer via a "standard" CWebBrowser2 wrapper and everything goes well (clicks, navigation, etcetc).
In my app I need to change "on the fly" the files that IE is going to show, for example: the user clicks to "original.html" and I show "processed.html", where processed.html is created on the fly from some dbase.
Till now I have done it using a OnBeforeNavigate2Explorer1 function like:
void CMyDlg::OnBeforeNavigate2Explorer1(LPDISPATCH pDisp,
VARIANT FAR* URL,
VARIANT FAR* Flags,
VARIANT FAR* TargetFrameName,
VARIANT FAR* PostData,
VARIANT FAR* Headers,
BOOL FAR* Cancel)
{
if( is_an_unprocessed_file( URL ))
{
CreateMyProcessedFile(URL,"processed.html");
*Cancel = (VARIANT_BOOL) 0xffff;
m_browser.Navigate("processed.html",Flags,TargetFrameName,PostData,Headers);
return;
}
*Cancel = (VARIANT_BOOL) 0x0;
}
everything works fine as far as original.html does not use frames.....
If original.html uses frames (either a frameset or an iframe) the "child" documents are not shown inside the main one but in a new window, i.e. a standard IE window pops up.
I have tried something with the TargetFrameName variable but with no luck...
Do you have any suggestion??
Thank you!
Luigi
PS: I am running these tests in XP with IE6.
|
|
|
|
|
luigi19771977 wrote: Do you have any suggestion??
Just one wild guess. You are calling Navigate before IE can process your Cancel. So just as an experiment, set a timer and go ahead and return from this event without calling Navigate to let IE process the cancel, then when the timer goes off do your own Navigate. If that works you will need to think about all the problems that could cause using a timer and maybe find a better solution.
Also you are deep inside Internet Explorer so you might try posting on some microsoft forums, there must be some for IE or even the actual COM interface or DLL or something.
|
|
|
|
|
Hi led mike,
thank you for the hint: I have tried somehting similar, i.e. saving the pair (page name,name of the frame) and after documentcomplete calling Navigate: no luck but probably I did something wrong in the COle* stuff...
could you recommend a "good and responsive" (TM) microsoft forum? (PM is ok if you prefere)
Thanks!
Luigi
|
|
|
|
|
I don't frequent any forum but these. Also I don't know what TM and PM mean in your post.
Perhaps you can look through the list of MSDN forums[^] and find something that looks good.
|
|
|
|
|
Hi,
thank you for the link, I will try to post there!
|
|
|
|
|
Hello,
Can anybody give me the code for finding eigenvalues & eigenvectors of any matrix or either tell me the way to do this.
|
|
|
|
|
i came across this concept long ago. can you just revise the concepts of eigenvalues and vectors such that i will try if i can remember it.
|
|
|
|
|
say A be any square matrix
then there exist
A*x=u*x u=scalar,x=eigenvectors
(A-uI)x=0; //from here we can calculate the eigenvalues u
//x is a non zero vector/matrix
|
|
|
|
|
|
Have a look at "Numerical Recipes in C" [^].
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]
|
|
|
|
|
If you got the code then please send ma at my Gmail naeemyaseen78@gmail.com
|
|
|
|