|
Hi Randor,
thanks for reply..
I have done code like below
but still i have same problem.
Please let me know am i coding in the right direction, because this thing is new for me..
WSADATA wsaData;
int iResult;
DWORD dwRetval;
int i = 1;
char *port = "80";
struct addrinfo *result = NULL;
struct addrinfo *ptr = NULL;
struct addrinfo hints;
iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (iResult != 0) {
printf("WSAStartup failed: %d\n", iResult);
return 1;
}
ZeroMemory( &hints, sizeof(hints) );
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
dwRetval = getaddrinfo("xx.x.xxx.xxx", "80", &hints, &result);
if ( dwRetval != 0 ) {
printf("getaddrinfo failed with error: %d\n", dwRetval);
WSACleanup();
return 1;
}
line 1: CoInitialize(NULL);
line 2: xyzService::CxyzService test;
line 3: CComBSTR result1;
line 4: test.Methodname(CComBSTR(L"0001"),CComBSTR (L"0001"),&result1);
line 5: CoUninitialize();
freeaddrinfo(result);
WSACleanup();
|
|
|
|
|
Hi Rahul,
What happens if you change this line:
dwRetval = getaddrinfo("xx.x.xxx.xxx", "80", &hints, &result);
into
dwRetval = GetAddrInfoA("xx.x.xxx.xxx", "80", &hints, &result);
[Update]
Also... the CComBSTR is going to be a Unicode string so this is all wrong.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi Rahul,
Change your definitions to the following and the MSVC compiler should link with the correct version of the function:
You can keep your call to getaddrinfo.
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
I just tested this on my Win2k box and your call to getaddrinfo was successful.
Best Wishes,
-David Delaune
|
|
|
|
|
Thankyou friend it is working properly...
|
|
|
|
|
Hi...
I need to get radius, diamensions and x, y cordinates of the circle from autocad drawing. if anyone knows please let me know.
Thanks...
G.Paulraj
|
|
|
|
|
u try ..Getpixel function ...i think it is ok
|
|
|
|
|
Hi...
i need to get the coordinates from autocad directly. can you please tell me about this detail???
Thankls....
G.Paulraj
|
|
|
|
|
Hello,
My post is not directly related to C++ programming. I need help about a MFC application. There is an annoying icon at the beginning menu row to the left of "File" menu item.
[img]http://img94.imageshack.us/img94/3084/appe.png[/img]
http://img94.imageshack.us/img94/3084/appe.png
I checked with resource editors and this is not defined in resources. I guess it is related to windows default exe icon. How can I remove that part so that "File" menu item moves to the beginning of the row? (No access to program sources.)
|
|
|
|
|
That icon comes up when an MDI app has it's child frame maximized.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Yes, you are right. I didn't notice it before, because the application uses child forms in maximized state by default. The name of the application is Agent Ransack and it is an alternative to Windows built-in search functionality. Usually one would work with just one child form.
Without having access to program source code, is there a way to prevent child form's icon and maximize, minimize, close items from showing up on main menu? By hex editing or resource hacking maybe?
Thanks.
modified on Tuesday, November 10, 2009 12:48 AM
|
|
|
|
|
How do i implement background transparency in my flash control?
|
|
|
|
|
I have an application that runs fine withing Debug but as a standalone goes to a not responding state if any other window on the screen is activated. My question is "is this a mis handling of messages" or some other messaging problem. Another symptom is that the main menu is lost when the program goes into this state.
|
|
|
|
|
When Task Manager shows a "Not responding" status, it usually means the application is doing some intensive processing which is not yielding control of the CPU to any other processes. Why it's doing that is up to you, the application owner. Look at your code to see what changes between Debug and Release builds.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
When the debug runs and release doesn't, it's very often a case of uninitialized variables or improper use of the ASSERT macros.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
|
zweberhardt wrote: My assignment is to accept a string of up to 256 characters from the user, and display the following information about the string...
Do your own homework. I will refrain from spelling out just how stupid it looks to ask questions like this.
Or maybe I won't.

|
|
|
|
|
|
Hey, at least you seem to get it. I just love the individuals who seem to think they're entitled to a free ride.
Take a crack at the assignment and if you have trouble, identify a specific problem(s) and I'm sure people will be willing to help.
|
|
|
|
|
zweberhardt wrote: a fellow student mentioned in passing that you can get "free" answers by asking questions that way.
If you had not included those last two words, that would have been a true statement. People here are more than willing to help.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
zweberhardt wrote: a fellow student mentioned in passing that you can get "free" answers by asking questions that way
I know that guy. He posted a homework assignment here last week and was told to f*** off and do his homework by himself.
Maybe he doesn't like you very much...
|
|
|
|
|
zweberhardt wrote: My assignment is to...
I need a code to that displays the above information.
So would you be turning in this assignment under the guise that you created it?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I deserved that. Won't happen again.
|
|
|
|
|
Hi
I am using following code to read in a bitmap file.
ifstream bifs( pFileName );
istream IStream(bifs.rdbuf());
But when I tried to use "istream.read( ... )" to get file data back, I can not get all the data in the file.
How can I solve this problem?
Thanks,
|
|
|
|
|
|
You should open file in binary mode.
-Saurabh
|
|
|
|