|
Then you should be able to create a DSN on your application's machine that "points to" the DB on the Web server. I did this once where a SQL database was on one machine and my client application and DSN were on another machine. Worked fine.
|
|
|
|
|
I had no idea that remote connections with ODBC were possible! I am OK with SQL the language, but very weak on the DB admin side and had no idea that you could map a remote DSN using ODBC administrator.
I went through all of the options in my ODBC administrator and nowhere does it ask me about the IP address for the remote server.
Is there a different ODBC admin tool I need to install first?
|
|
|
|
|
Hi,
I've written a small Winampplugin. Now i Want to catch the Keymessages. I've tried to this by editing the Pretranslatemessage function, but it never gets any messages...what to do now`?
Thanks for your help
|
|
|
|
|
I've lost a class!!!
I've got CMyClass.cpp and CMyClass.h included in the project.
I've got CMyClass working in ClassWizard.
BUT I can't find CMyClass in the left pane of the work area, where I usually have all my classes listed in a tree structure.
What can I do?
|
|
|
|
|
Close visual studio and delete the .ncb file and then reopen the workspace.
John
|
|
|
|
|
Easier and faster...
modify your header file and re-save it (add a space and delete it again or something like this)...
this normally does the trick...
Hope this helps...
|
|
|
|
|
Ok, done!
Thanks!
|
|
|
|
|
You are welcome, this is an annoying problem in the VC ide...
|
|
|
|
|
Hi,
Can anyone tell me how to call an ASP page from a VC++ winsock app?
I have the usual stuff in there at the moment:
WSADATA wsadata;
char Mesgback[10];
unsigned int length;
int nCode = WSAStartup(MAKEWORD(1,1), &wsadata);
u_long addy = inet_addr(szServer);
in_addr Address;
memcpy(&Address, &addy, sizeof(u_long));
SOCKET sd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
sockaddr_in sinRemote;
sinRemote.sin_family = AF_INET;
sinRemote.sin_addr.s_addr = addy;
sinRemote.sin_port = htons(portnum);
connect(sd, (sockaddr*)&sinRemote, sizeof(sockaddr_in));
But I need to call an ASP page as would be done via:
Example: http://www.somedomain.com/somepage.asp?req1=x&req2=y&req3=z
Where the asp page would do the normal request("req1") etc and then do some response.write and the client would then read them in.
Any ideas?
Many thanks in Advance.
Eta_Beta_Pi
|
|
|
|
|
One solution is to send a request.
GET /somepage.asp?req1=x&req2=y&req3=z
...
Here is one reference for HTTP protocol.
http://www.faqs.org/rfcs/rfc2616.html
Kuphryn
|
|
|
|
|
Thanks kuphryn,
Where abouts in send is that implemented? Or is it tacked on to the message?
Cheers
Eta_Beta_Pi
|
|
|
|
|
It's not part of the socket interface.
HTTP is a simple communication protocol riding on the back of eg. TCP/IP.
Basically it is just a matter of sending a request, and getting a response and thats it.
So when your socket is connected to eg. 127.0.0.1 port 8080, then you can send the request "GET ..." including all the required headers through your socket. The server will send the response, and if it is HTTP 1.0, it will close the connection again.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Hi!
I must write a Testprogramm, which use the COM Port to send bits. But I may not send any start bit or stop bit. I want to write this Programm with VC++ 6. Normally for using COM Port is the DCB structur and CreateFile with an Handle. But i can only turn off the Stop bit, Parity ...and not the Startbit. This will be send..or I don't understand this?
Which function I can use for my programm?
Thanks and Sorry about the English
|
|
|
|
|
You mean, the startbit, which be send normally by the COM Port (if I use Handle with CreatFile and SetCommState with an DCB structure) is only datatrash, that will be send before my own "StartBit"?
So, there is no posibility to use an another function to send bits through COM Port?
|
|
|
|
|
Why do you want to disable the startbit ? In fact this bit is used by the serial port to keep synchronisation. It has nothing to do with your own data and won't "affect" your data.
Hope this helps
|
|
|
|
|
Because my programm send the bits to an HF-Transceiver, which communicate to the receiver with his own protocoll. My Software should be an Test application, you can send any data with this protocoll. If the another Startbit will be send, it will disturb the test routine.
|
|
|
|
|
No, you don't understand: the startbit is part of the protocoll of the serial communication. So, when the receiver will receive your data, it will take only your data and NOT the startbit, transform your data into his own HF-protocoll and send them to the receiver.
A serial communication NEED always a start bit and this bit is present in the serial protocoll of your HF-transceiver. It it used to signal the begining of the byte.
|
|
|
|
|
You can't disable the start bit. It is a property of the RS232 protocol and is the only way the receiving computer knows when to start receiving a byte.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
with the SHGetFileInfo i retrieve the icon of a application. I want store the icon in a CBitmap object. How can i do this?
tommy
|
|
|
|
|
Use GetIconInfo() which will return the image and mask bitmaps (hbmColor and hbmMask members of the ICONINFO structure) and the use CBitmap::FromHandle() or CBitmap::Attach() to convert to a CBitmap.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have an application that prints the contents of the screen on a printer. The user has the option to select some scaling factors for the print out. (E.g. fit to page, etc...)
I am using the same printing function, which draws in a DC for the screen output and for the printer output.
On NT, 2000 and XP am using the SetWorldTransform function before painting to the printer DC in order to scale the output. This works fine.
But since SetWorldTransform does not work on 95/98 or ME, I am searching for a replacement of the SetWorldTransform function. Of course I only need the scaling ability of the SetWorldTransform function with constant factors for x an y.
I am painting in the MM_TEXT mode so I thought that I could use the MM_ISOTROPIC instead to scale the viewport extends. So I need the same features (coordinate directions, origin) like in MM_TEXT mode but with scaled viewport extends!?
How can I do that (SetWindowExt, SetViewportExt,...)? I already tried some things but without any results.
Thanks in advance.
|
|
|
|
|
In a past project, I used MM_TEXT for screen drawing and MM_ANISOTROPIC for scaled printer output. Worked fine.
onwards and upwards...
|
|
|
|
|
|
Hi, here i have an urgent question, can anyone please advise?
I have an existing workable stand-alone visual c++ application and wish to put it on the web so that people can access its functionality through internet/intranet with webpage browser.
I am not clear at all which way I should follow because I don't have much experience on web application with vc++.
so far, some words are popped up in my mind, such as asp, cgi, jni... is there a simple way to do so?
I cannot get visual studio.net easily. probably .net is not a good solution to me.
Thanks again
|
|
|
|
|
One solution is ActiveX. Create an ActiveX control, which will enable users to access it via HTTP. The control can spawns the stand-alone exe and get data from and to the exe. There are other solutions too such as redesigning the exe as an in-proc COM server.
Kuphryn
|
|
|
|