|
i want to convert LPWSTR in to STL basic string.
Amit
|
|
|
|
|
USES_CONVERSION;
string s(W2A(myLPSWSTR));
that's one way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The STL has two typedef s which are shortcuts for specialisations of basic_string : std::string and std::wstring . If you're working with LPWSTR s then you probably want std::wstring . Here's an example:
std::wstring s = L"Hello";
Steve
|
|
|
|
|
hi all
i have coded an applications which gives the status of network. my application is running when the network gets disabled or when a network cable is unplugged. i am one more scenario where i need to run my application i e., when an firewall is installed. i need to run without setting the settings of firewall . i need to achieve it programmatically
kindly help!!!!
regards
sudhir
|
|
|
|
|
hmm If we could change firewall settings programmatically then they would't be very secure.
You didn't specify which settings you want to change but you could look into UPnP.
Some firewall/NAT devices have UPnP support (although most secure networks don't enable it I
imagine).
If the firewall is the Windows Firewall on XP and your app is running with admin privileges then
there's the Windows Firewall API as well.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi all
We are devolpping xpcom component to capture the events inn mozilla browser.Here we encounted the problem,when we enter an url on address bar of mozilla ,the address of perticula site nust displayed in messgebox.For that we have a lot confusion how handle the events like
Navigete before,navegate error,navigate complete.
plz give me a solution.
#sanroop#
|
|
|
|
|
Try it man.
Come online at:-
jubinc@skype
|
|
|
|
|
i have a command bar in my application that runs on WinCE module.
i need to increase the size of it. how do i do it???
i am using this to create the menubar.
if(SHCreateMenuBar(&mbi))
{
g_hwndMb = mbi.hwndMB;
TBBUTTONINFO tbbi = {0};
tbbi.cbSize = sizeof(tbbi);
::SendMessageW(g_hwndMb, TB_GETBUTTONINFO,0, (LPARAM)&tbbi);
g_hMenu = (HMENU)tbbi.lParam;
}
|
|
|
|
|
hi,
i have a ocx created, i add that ocx in a dialog based app.nw i need to set properties for that ocx in the dialog hw to do.i need to know the similar concept in vc++ as dat of property bag concept in vb
zari
|
|
|
|
|
Hello,
I have declared a variable like this:
UINT * p[2000*800];
and I want to send this variable through network using
winsock2.
And time is very important for me...
Thank you.
|
|
|
|
|
There's not enough information here. What have you done so far?
|
|
|
|
|
send(socket, (const char*)p, 2000*800*sizeof(p[0]), 0);
Of course I've omitted error handling and the possibility that all bytes don't get sent in one
call.
Are you sure you want to send UINT pointers across the network? Pointers aren't much use
except in the context of the process they were created in.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
hi,
I h've been reading on some openGL stuff and need some help with a simple program.
I want to display a cylinder with hole.
I am drawing cyliner with
gluCylinder(cyl, 3, 3, 5, 12, 12);
I want to set thickness of cylinder.
thanks in advanvce.
Rushiraj
|
|
|
|
|
I don't think OpenGL can do (or defines ) thickness of a surface.
You will need to draw one smaller cylinder (or bigger ) with a radius difference of the desired thickness, and draw the top and bottom trimmed surfaces to close up the top and bottom of the cylinder.
|
|
|
|
|
rushiraj.jhala wrote: I want to display a cylinder with hole.
the gluCylinder is some-what of a rough tool for this type of work. You can get into some of the super-ellipsoids or constructive geometry, both of which have their difficulties. You can also switch prototypes to a torus and scale it significantly in one direction. This does produce a rounded top rather than a flat. The other method is just to calculate it. A cylinder is easy to draw as it is just a circle with in an inner and outer dimension and a surface between the two. You could actually define the whole thing as one tri-strip by running a diagnal line around the inner and outer surfaces and meeting back up with itself at the end. 360 degrees, one tri-strip, makes a fast and easy surface to play with (this would be equivalent to a wrap torus, but with a flat inner-outer and top-bottom dimension).
Constructive Solid Geometry[^]
Wrap Torus[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
pls do help me in ending a process from the server without shutting down the remote host..
while using InitiateSytemShutdown() it forcefully closes and then shutdowns the system. but i need to end the process wihtout shutting down the system.
pls do reply as early as possible..
|
|
|
|
|
void EndProcess(string PID)<br />
{<br />
HANDLE ps;<br />
int id=atoi(PID.c_str());<br />
ps = OpenProcess(1,false,id);<br />
if(ps)<br />
{<br />
if(!TerminateProcess(ps,-9))<br />
{<br />
ShowMessage("Could not end process specified!");<br />
}<br />
else<br />
{<br />
ShowMessage("Process successfully terminated!");<br />
}<br />
}<br />
}
Is that what you want?
|
|
|
|
|
Hi,
I wrote a dll ,currently i was assigned to write a UNIT TEST CASE DOCUMENT,i don`t have a prior experince of writing unit test case document.what does unit test case document means..?i have around 20 functions in the dll. Does any one has the format of the unit test case document, sample document or related URL,kindly help me..i don`t know whether this is the correct forum to post...
Thanks in before
James
|
|
|
|
|
If you have around 20 functions in your DLL, then unit testing simply would mean testing each and every one of those functions individually for functionality, performance, or whatever you are intending to test it for. Unit Testing, in Wikipedia[^]
I am not ashamed to confess that I am ignorant of what I do not know.
- Marcus Tullius Cicero
|
|
|
|
|
I need mstcpip.h file to compile my program.
Who can help me?
Please send it to me(contact to me via email: theoceanman246@yahoo.com).
-- modified at 0:25 Saturday 24th February, 2007
|
|
|
|
|
|
I got it.
Thanks u so much!
|
|
|
|
|
You're welcome
|
|
|
|
|
skyline2 wrote: Please send it to me(contact to me via email: theoceanman246@yahoo.com).
No, we won't. If you won't read the forum, why would we reply to you ?
Way to attract spam, BTW.
I'd be very surprised if your program compiles as a result of adding this header, a #include for a header almost always also requires a lib file, and probably other header and/or cpp files. A header can represent the hook into a library, it rarely represents a library.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK,I'll try it more.
Thanks anyway!
|
|
|
|