|
I want to create a provider for oracle. My own provider not oledb's one. How do you I do that. What are the entry points of oracle.
It will be a big help
|
|
|
|
|
|
Hi.
I have a program that creates a datagram(udp) socket and sends something using sendto(). But windows/winsock seems to determine the source port it uses (which varies somewhere around 1100). But i need it to be sent from an exact source port. I tried to play around with the bind() function and the sockaddr_in structure but no luck so far. Does anyone know how to do this?
Any help would be very much appreciated. Thank you.
Kuniva
--------------------------------------------
|
|
|
|
|
Try this:
SOCKADDR_IN sockAddr;
memset(&sockAddr,0,sizeof(sockAddr));
sockAddr.sin_family = AF_INET;
sockAddr.sin_addr.s_addr = inet_addr(lpszSocketAddress);
sockAddr.sin_port = htons((u_short)nSocketPort);
bind(socket, &sockAddr, sizeof(sockAddr);
hope this helps
modified 12-Sep-18 21:01pm.
|
|
|
|
|
good
A Programmer Never Dies..***
|
|
|
|
|
hi,
I already read some aticles about CRC, but need to get a thorough understanding of CRC, any one can help?
thanks
Extreme programming. Do the No.1
|
|
|
|
|
|
Have you even tried googling for "CRC polynomial"?
If you really need a "thorough understanding" of it, you need something close to a math degree. Really.
|
|
|
|
|
I want to add a toolbar in my win32 applicationn.....
Any Help?
Thankyou..
|
|
|
|
|
Do a search for Control Spy on MSDN. Control Spy is articles and source code showing how to work with toolbars and other win32 common controls.
|
|
|
|
|
Muzzamal wrote:
Any Help?
Ehhh, yes? The WWW world is full of examples of this. Not to mention you get it "for free" (not really, but close enough for your use) from MFC. It's all documented and with lots of examples.
|
|
|
|
|
I am sorry if I had chosen the invalid thread for my question.
I have a problem - I need to get the handles of all installed WH_KEYABOARD hooks in my system. Currently I need this for Win95/98/Me. I just know, that hooks are the USER objects, so there is a way to enumerate them. But MSDN does't say anything.
And one more question - is it possible to clear the hook chain retaining just mine and system - delete just user-installed?
I'll appriciate any suggestions and any help.
Thanks.
|
|
|
|
|
Hi,
I am in very New to VC, and I have written a code which will connect to another machine and return either a -1 or non negative value.
I am getting a "-1" for bind function. Please can some one help me
out with it..
==============================================================
#include <stdio.h>
#include <winsock.h>
#include <windows.h>
#include <iostream.h>
WSADATA wsData;
SOCKADDR_IN saServer;
SOCKET s;
void main()
{
WORD wVersionRequested = MAKEWORD(1,1);
int nRet,sd,d;
//
// Initialize WinSock
//
nRet = WSAStartup(wVersionRequested, &wsData);
printf("WSASTARTUP nret = %d\n",nRet);
sd = socket(AF_INET, SOCK_STREAM, 0);
printf("SOCKET = %ld\n",s);
saServer.sin_family=AF_INET;
saServer.sin_addr.s_addr = inet_addr("192.168.0.4");
saServer.sin_port=htons(80);
d = bind(s,(struct sockaddr*)&saServer,sizeof(saServer));
printf("BIND = %ld\n",d);
getchar();
}
=============================================================
|
|
|
|
|
try this:
memset((char *) &saServer, 0, sizeof(saServer));
saServer.sin_family=AF_INET;
saServer.sin_addr.s_addr = inet_addr("192.168.0.4");
saServer.sin_port=htons(80);
|
|
|
|
|
Hi guys.
I have a CListCtrl control in my application. I would to let one of its items be selected when the user click some buttons.
How can I do?
CListCtrl::SetHotItem doesn't work.
Hi guys. I'm a very fat man. Do you like fat men?
|
|
|
|
|
Use SetItem. mask = LVIF_STATE, state = LVIS_SELECTED;
|
|
|
|
|
I Developed a MFC dialog box,i want insert a flash file in the DialogBox, how can i do this ?
Any help...
Thank you.
|
|
|
|
|
Its simple.
I have done that for my screensaver.
Add Shockwave ActiveX control to your dialog by
Project->Add Components.
THen there in registered activeX components and then ShockWave ActiveX or watever u want.
Then put it in ur dialog and add a member variable to your activeX control.
Then use this code in ur app
<br />
m_flash.SetMovie(strFile);<br />
m_flash.Play();<br />
-----------------------------------------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
I write header file "ooo.h" and want to write this below text in ooo.h
#define X "123"
This below is some part of my code
************************************************
FILE *outp;
CString output_filename;
Output_filename = "ooo.h";
outp = fopen(output_filename, "w");
fprintf(outp, "#define X "123" ");
fprintf(outp, "\n");
if (output_filename)
{
fclose(outp);
}
************************************************
When I compile program there are 2 error messages happen cause by this line
fprintf(outp, "#define X "123" ");
I change that line to
fprintf(outp, "#define X 123");
So I can compile program and it write
#define X 123
but I want
#define X "123"
If you know how to solve my problem? Please tell me.
Thank you.
|
|
|
|
|
ooosawaddee3 wrote:
fprintf(outp, "#define X "123" ");
you need to escape some of these quotes:
fprintf( outp, "#define X \"123\" \n" );
try that...
Just trying to keep the forces of entropy at bay
|
|
|
|
|
use
\" in place of "
A Programmer Never Dies..***
|
|
|
|
|
I create a process(a console application), and after some operations, i need to terminate it. Now I use TerminateProcess() function, and it does work. But i'd rather like the process exit normally. So i need to send some keyboard messages('Esc' and 'n') first, then terminate it. How?
Thanks!
|
|
|
|
|
AttachThreadInput + SendInput
|
|
|
|
|
I have tried AttatchThreadInput() and keybd_event() instead, but they can't work properly.
keybd_event() does simulate a keyboard message, but only my thread received it, and the child process doesn't.
Can you give me some further advice?
|
|
|
|
|
Please explain exactly what you have done, and what you want to do. With this information I could answer "Scream and shout" and it would be an answer equally correct and incorrect.
|
|
|
|