|
You're right. Didn't work.
Thanks
|
|
|
|
|
hint.
myString.c_str() will return a "const char *". You can then assign that to the variant.
_variant_t v2 (myString.c_str());
Louis
* google is your friend *
|
|
|
|
|
You're right! I tried that, but I did it wrong. I used:
_variant_t v2 (myString.c_str);
Now it works with the parenthesis. Thanks!!!
|
|
|
|
|
Hi
can you help me plz?
I want to use InternetFindNextFile with http not ftp
I use this way
1- InternetOpen
2- InternetConnect
3- ? which function (I think FtpFindFirstFile is for ftp not http)
if i want to use InternetFindNextFile it dont work
can you help me plz?
Thanks in advance,
|
|
|
|
|
messages wrote: if i want to use InternetFindNextFile it dont work
Why? Did you first call FtpFindFirstFile() ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi DavidCrow ,
I dont need to ftp I want to use InternetFindNextFile with http but I dont konw can you help me pls?
thanks
|
|
|
|
|
Did you miss this in the documentation:
InternetFindNextFile() continues a file search started as a result of a previous call to FtpFindFirstFile() or GopherFindFirstFile() .
If you are using MFC, there are several HTTP-related classes you can use for file retrieval.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Dear DavidCrow
I use FtpFindFirstFile but it return 0
WIN32_FIND_DATA data;
HINTERNET h3= FtpFindFirstFile(h2, "*.*", &data, 0, 0);
I guess that it work only with ftp
I use
hInternet = InternetOpen("View",INTERNET_OPEN_TYPE_DIRECT,NULL, 0, 0);
HINTERNET h2=InternetConnect(hInternet,??,INTERNET_SERVICE_HTTP,NULL,NULL,INTERNET_SERVICE_HTTP,0,0);
in ?? I dont know that what? address from ftp or http
if I write www.namesite.com then it return handle HINTERNET
I want address from only http://
but HINTERNET h3= FtpFindFirstFile(h2, "*.*", &data, 0, 0);
always return 0 and data is unknown in fact NULL
Thanks DavidCrow
|
|
|
|
|
The HTTP spec doesn't allow for directory browsing, you need to know where the file is before you can retrieve it. Any sites which *look* like it's a directory listing is just a HTML page that the server is generating on the fly.
You'll need to see if theres an FTP (o Gopher ) version or the site.
Gavin Taylor
w: http://www.gavspace.com
|
|
|
|
|
Hi,
using Visual Studio 2003.
I have created a simple dialog based mfc application. I added a second resource file, adjusted the starting symbol values in the generated resource1.h file. Then I added a dialog to that new resource file. My problem is that I cannot add a variable to a control (value or control variable). I cannot see any control IDs in the events pane of the dialog properties so that I could add event handlers to controls. It works with the main resource file but not with this second one.
What am I missing ?
Louis
-- modified at 13:15 Wednesday 19th April, 2006
|
|
|
|
|
If I have a service running set up with Local System account.
Then if I get the System variable 'TEMP' with:
char* tempPath = ::getenv("TEMP");
I will get the variable that is set under "System variables" under "Environment variables" in System properties.
When I later run my client, I will get the current users TEMP path with the same call.
Since that user as it's own defenition of TEMP. ("User variable for XXX" under "Environment variables" in System properties.)
How can I get the "System variable" value for the TEMP variable when running as a the XXX user?
Or in other words: How can I get whatever the service is returned from the client?
//T
|
|
|
|
|
QuaKx wrote: How can I get the "System variable" value for the TEMP variable when running as a the XXX user?
They can be obtained from the HKEY_CURRENT_USER\Environment registry key.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks but, that is only the Users settings. I wanted the machine settings or Global once.
To bad there wasn't a HKEY_LOCAL_MACHINE\Environment.
|
|
|
|
|
Maybe try GetEnvironmentVariable function
|
|
|
|
|
Sorry, but that only gets the users value of TEMP. Since it superseeds the System value.
|
|
|
|
|
this is a repost, and i already told you that if you didn't want to come into the documents and settings\user\temp folder, then you had to do something like that :
%windir%\Temp
|
|
|
|
|
Yes, I posted in the wrong area.
And %windir%\Temp is a pure guess.
Since its possible to change the system environmental variables.
I leave the guessing to the meteorologists.
/T
|
|
|
|
|
Hi all,
I have a customized CFontDialog. I need to have the font sizes between 1 to 12. I've done it. But while selecting the font names, the font size combo box gets updated with default sizes. I need to have the same sizes (1..12) for all fonts.
This is how, I am doing this:
ON_CBN_SELCHANGE(cmb1, OnSelchangeFontNameCombo)
// cmb1 is for Font name combobox
OnSelchangeFontNameCombo()
{ // no code here
}
Since I have written my own SelChange hander, I am not able to generate the sample preview text.
If anyone could suggest me to achieve this, it would be more helpful.
Thanks in advance,
Sarvan AL
|
|
|
|
|
I've hit a CSS bug in IE that disappears when the window is resized. I can't find a way to work around it in CSS and so was wanting to do it in my program's code instead, forcing the embedded browser window to recalculate it's layout after it has been opened (neither a simple refresh nor re-sizing the window seem to work).
Anyone know if this is possible?
0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall.
Awasu 2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
call SetScrollSizes with desired size.
Regards
Microsoft MVP in Visual C++
http://blog.joycode.com/jiangsheng
|
|
|
|
|
Hi all,
I have an MFC app that was written in VC++6 that I'd like to run under VS 2003. Is there anything available that I can use to convert the code so I can compile it straight off?, or is it just plain wishful thinking?
Thanks,
Jimmy
|
|
|
|
|
VS2003 will convert your project automatically. It can display some errors in your code, but surely nothing what you can't correct.
-----------
Mila
|
|
|
|
|
Thanks for the reply Mila.
It does convert automatically but I'm getting errors with in afxwin.h Which, I'll have to admit, I wouldn't feel comfortable altering. I've attached the error below.
Cheers,
Jimmy
error C2259: 'CDocument' : cannot instantiate abstract class
due to following members:
'CDocument::~CDocument(void)' : pure virtual function was not defined
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(4863) : see declaration of 'CDocument::~CDocument'
|
|
|
|
|
Do you have a CDocument -derived class, and not just an instance of CDocument ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi David,
I do, I've got an SDI app using the doc/view architecture. I've done a bit of googling to try and solve this problem, one of the solutions was to change the doc class from DECLARE_DYNCREATE to DECLARE_DYNAMIC. I've done this but am still running in to the same problems as before.
Cheers,
Jimmy
|
|
|
|