|
Your welcome, thanks for letting me know it worked OK.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
hi all,
i want to know which ports of a PC are open and then i want them to open or close according to me, as well as i want to keep the ports invisible to others if they access it, even if they are open it shows if they are close. you can say in stealth mode..Like they do in firewall...please help....any idea are welcome..
if anyone can help me then please do email a copy of your answer at himanshu@sampatti.com
thanks in advance..
Himanshu
|
|
|
|
|
I have access to a database over the internet (I have user name and password) [Internet Explorer]. I would however like to enter the username and password programmatically. How can this be done?
I can easily access the database, which consists of jpg-pictures BTW, using the ShellExecute command which opens a new Internet Explorer window. I now want to integrate the IE functionality into a view in my own program. Shouldn't really be a problem, but:
I have tried to open the connection using the following code:
CInternetSession session;
CHttpConnection *connection = NULL;
CStdioFile *file = NULL;
CHttpConnection *connection = session.GetHttpConnection(url,nPort,user,pass);
CStdioFile *file = session.OpenURL(url);
The only web page I can access with this code is the page that tells me that I couldn't access the server because of bad password....
Any ideas?
Christoffer Andreas Andersen
"I'm just here to regulate the funkyness!" - Gandolfini
|
|
|
|
|
Is there not a syntax for URLs like
http://user:password@mysite.com
or perhaps
http://user:password@www.mysite.com
I'm sure that it's possible to specify credentials in this way, although for the life of me I can't remember where I've seen it done - I think on a "Members" section on a company's support website.
Steve S
[This signature space available for rent]
|
|
|
|
|
Thanks, but I figured it out myself. Using CHttpConnection::OpenRequest (), AddRequestHeaders and SendRequest I made it work fine.
Now my problem is that I can't seem to get the pictures that I download from this site to show themselves as they come in.
- I get the picture from the database and saves it locally on my harddisk.
- Then I throw the picture into an IPicture and StretchBlt's it onto my CDC...
This is all done in a nice for-loop, but only the last picture is shown.
I have CDocument::UpdateAllViews () commands in there but my CView doesn't get updated until all pics have been downloaded. Also, my whole split window application hangs until the last pic has been downloaded and in my CView.
Any ideas?
Christoffer Andreas Andersen
"I'm just here to regulate the funkyness!" - Gandolfini
|
|
|
|
|
What's the point in the following code (generated by the app wizard)?
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Dylan Boycott Bush Punch GWB
|
|
|
|
|
Well, these two objects are different beasts. __FILE__ is a macro expanding to the name of the file, i.e. everywhere you write __FILE__ is like you're writing instead "foo.cpp" or whatever the file is called. THIS_FILE is a true variable, not a macro, and moreover is mutable, which means you could even change its contents. As for the specific use of THIS_FILE I don't really know. Scanning thru the entire source code of MFC does not reveal any use of this variable.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
To give a more formal answer than Joaquim's, this is necessary to display Debug information in the Debug Window.
~RaGE();
|
|
|
|
|
Hi,
I've written a program to test the performances of a windows timer under different work loads. In a first step we used the program under a windows 98 platform with a timer frequency of 5Hz. So every 200msec the Wintimer should sent a WM-TIME message to the OnTimer function. Because the timer tick frequency of a windows 98 platform is about 18Hz(55msec) there will be approximately a time delay of 20msec. When I start the program with no work load(0 floating point operations) the time delay is also 20 msec, so everything is normal. But when I want to increase the work load to 1.000.000 floating point operations the time delay becomes smaller. I would expect that it would increase with increasing work load!
Can anyone explain this?
Kind regards,
Geert
|
|
|
|
|
My semi-educated guess: that your program is getting more scheduled time and can therefore respond quicker to the WM_TIMER message. My guess is that if there was another program consuming more CPU than yours, you might take longer to respond.
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
I want to capture the packet (that comes to my server application) and display the fields in that packet like source address,destination address e.t.c.
I am using the winsock2 library for my server.
Please help me (if i have declare a struture of TCP,UDP and than capture the packet) with the relevant theory, logic, code or relevant website for achieving my purpose.
Reply me soon
|
|
|
|
|
I want to capture the packet (that comes to my server application) and display the fields in that packet like source address,destination address e.t.c.
I am using the winsock2 library for my server.
Reply me soon
|
|
|
|
|
Hi All
I have an xml which is passed thru a sytlesheet and in the resultant file, two tags IDValue and IDScheme are not properly output.
Could you please help me out !
Thanks
<b>Enclosed - Source XML </b>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\ExpressPrototypes\Chi Interface Prototype 2\XMLFiles\RegisterPatientResponse.xsl"?>
<gen:RegisterPatientResponse xmlns:gen="http://www.show.scot.nhs.uk/isd/General" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- xsi:schemaLocation="http://www.show.scot.nhs.uk/isd/General CHIRegisterPatientResponse.xsd" -->
<!-- Contains standard patient response header and a patient body which contains the CHI Number -->
<gen:StandardPatientResponseHeader>
<gen:ReturnCode>SUCCESS</gen:ReturnCode>
<gen:ErrorCode>0001</gen:ErrorCode>
<gen:ErrorText/>
</gen:StandardPatientResponseHeader>
<!-- Standard patient response body containing the CHI Number -->
<gen:StandardRegisterPatientResponseBody>
<gen:PatientDetails>
<gen:PatientId>
<gen:IdValue>1601025017</gen:IdValue>
<gen:IdScheme>CHI</gen:IdScheme>
</gen:PatientId>
</gen:PatientDetails>
</gen:StandardRegisterPatientResponseBody>
</gen:RegisterPatientResponse>
<b>Enclosed Source XSL</b>
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gen="http://www.show.scot.nhs.uk/isd/General" xmlns:req="http://www.isoftplc.com/Express/Chi/RegisterPatientResponse" xmlns:hdr="http://www.isoftplc.com/Express/Chi/Header" exclude-result-prefixes="gen hdr">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text()|@*"/>
<xsl:template match="gen:RegisterPatientResponse">
<gen:RegisterPatientResponse>
<xsl:apply-templates/>
</gen:RegisterPatientResponse>
</xsl:template>
<xsl:template match="gen:StandardPatientResponseHeader">
<gen:StandardPatientResponseHeader>
<gen:ReturnCode>
<xsl:value-of select="./gen:ReturnCode"/>
</gen:ReturnCode>
<gen:ErrorCode>
<xsl:value-of select="./gen:ErrorCode"/>
</gen:ErrorCode>
<gen:ErrorText>
<xsl:value-of select="./gen:ErrorText"/>
</gen:ErrorText>
</gen:StandardPatientResponseHeader>
</xsl:template>
<xsl:template match="gen:StandardRegisterPatientResponseBody">
<gen:StandardRegisterPatientResponseBody>
<gen:PatientDetails>
<gen:PatientId>
<gen:IdValue>
<xsl:value-of select="./gen:IdValue"/>
</gen:IdValue>
<gen:IdScheme>
<xsl:value-of select="/gen:IdScheme"/>
</gen:IdScheme>
</gen:PatientId>
</gen:PatientDetails>
</gen:StandardRegisterPatientResponseBody>
</xsl:template>
</xsl:stylesheet>
The values IDValue and IDScheme are not properly output
|
|
|
|
|
Hi,
I'm making a program that have a listview that lays on top of another window(different program). I'd like to show the context menu of the other window. I've tried to send a WM_RBUTTONDOWN message and also WM_CONTEXTMENU, but it doesn't work. Can anybody help me?
I hope my question is clear...
-------------------------------
Greetz,
MG
|
|
|
|
|
MaxiGroovy wrote:
I hope my question is clear...
Well, not really ... What you mean by "show the context menu" ? You want to show the menu items as items in your listview ? Or you simlpy want to open the context menu of the underlying window when your program lays on the top of it ?
~RaGE();
|
|
|
|
|
[quote]Or you simlpy want to open the context menu of the underlying window when your program lays on the top of it ? [/quote]
This one
Just open the context menu of the underlying wnd
-------------------------------
Greetz,
MG
|
|
|
|
|
I think the WM_RBUTTONDOWN should do if you also give the focus to the underlying window, since if the focus directly returns to your own app, the menu vanishes before ever being displayed. So i think you retrieved the hWnd using GetWindow() ? use it to give the window focus, and then send the message.
~RaGE();
|
|
|
|
|
Hey I've got my ListView showing the system icons for each file type, but for directories and a few other files the icon have a black border, instead of the 'transparent' shadow like in IE and others. This is on WinXP, just woundering how I get rid of them? or how to handle them properly, tried searching around and couldn't find anything and the example on CP shows the same 'black borders'.
Luke.
oh yeh I'm using WTL not MFC if that matters.
|
|
|
|
|
when i call PrintDlg with hDevNames set to printer installed at machine what is actually off (driver 'winspool' enabled to select it in previous PrintDlg call but DocumentProperties called after failed)
CommDlgExtendedError returns CDERR_MEMLOCKFAILURE
- all is ok when i set hDevNames to null before call
- when i try to do own GlobalLock to it it makes no problem
seems to me strange solution like:
if CDERR_MEMLOCKFAILURE try to call again with hDevNames=NULL
any experiencies with?
t!
|
|
|
|
|
hi,everybody
Did you use "libxml" to parse your xml file ? I need your help .
how do I parse dtd file by libxml ?
after I parse dtd file ,how do I take use of result for parsing xml file ?
such as ,my dtd file is Goodxml2.dtd
-----------
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT bookshell (book*)>
<!ELEMENT book (author, title)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT title (#PCDATA)>
---------------------------------
my xml fils is Goodxml2.xml
-----------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookshell SYSTEM "GoodXml2.dtd">
<bookshell>
<book>
<author>Du Peng Chao</author>
<title>Today Story</title>
</book>
</bookshell>
----------------------------------------------
how do I parse dtd file by libxml ? then take use of parsing result to parse xml file for get element content ?
thank you very much
|
|
|
|
|
hiz, i hav a question..
i can already display my database by ADO.
but under 1 section named BIbID it always display 0 i tink it becoz it consist of alphabet N number.
For the rest, it ok because it only contain no.
how do i correct it? thanks
|
|
|
|
|
How can I get application path ?
My condition
1) The Application is already installed on computer
2) The Application is not running.
3) I want to get that application path
sample (acrobat reader, icq, etc...)
1) Acrobat Reader is already installed on computer
2) The Acrobat Reader is not running now.
3) I want to get that Acrobat Reader Path.
How should I do (Howto or Library) ?
Thank you for your kindness.
|
|
|
|
|
I think you have to write SEARCH code.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Well,Let me correct myself.You can do it with WMI.I never use it with VC myself but you can check it in MSDN.Look up Win32_SoftwareElement and Win32_InstalledSoftwareElement .
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Look at the Registry entries.
Look at all the Registry functions in MSDN. With things like RegEnumValue , RegEnumKey , RegEnumValue you should find the application installed, and the path to it (the value in which these are stored are always the same, i.e. Reader should be under Acrobat Registry Key).
~RaGE();
|
|
|
|