|
In my downloader, I specify the user/pass in InternetConnect() , not InternetSetOption() . Try moving the user/pass to InternetConnect() and see if that changes things. Also check that you're passing the INTERNET_FLAG_SECURE flag to HttpOpenRequest() .
|
|
|
|
|
Thanks for the response and I am passing the INTERNET_FLAG_SECURE to the httpCreateRequest() function. And I'm sure I can modify my application to pass the the credentials to InternetConnect() but I'd rather know why InternetSetOption() isn't working as designed. On a side note I have been using InternetQueryOption() function to make sure they are correct after setting them. Adding the seccurity headers manuanlly also works. I work for a internet multimedia company and the extra msgs are painfull.
|
|
|
|
|
Hi,
I am trying to call ShellExecute() to run an .exe that takes 1 or more file paths as command line parameter(s).
Although when I format a string like:
""C:\\file1.txt" "C:\\file2.txt" "C:\\file3.txt""
as the lpParameters param I always get an SE_ERR_ACCESSDENIED error.
Am I using the correct command line formatting, as if I pass a ""
(NULL string) as lpParameters the function runs the exe OK.
Many Thanks.
|
|
|
|
|
use the \" character to insert a double quote character in your string
|
|
|
|
|
This is what i've done already, The string I've included in the example is how it appears in memory(NOT in source code). I just can't work this out as when I double click a file that is associated with the exe in explorer the command line reads with quotes around
that file name EXACTLY as I have in the source code.
|
|
|
|
|
Atom wrote: The string I've included in the example is how it appears in memory(NOT in source code).
Then the backslashes are the problem. You only use one backslash in file paths.
|
|
|
|
|
Hi,
Thanks, solved the problems with the backslashes,
now I can shellexecute() with a command line containing multiple file paths.
The problem I am having now is that when I test the command line string
with a string of length 1951 it works fine, but if I add one more file path
to this string which takes the length to 1983 the function fails.
So presumably the command line string has a max length between 1951 & 1983.
I will test this further, maybe shellexecuteEX() is the way to go.
Many thanks for your help.
|
|
|
|
|
how do you know the function fails ?
getting an error message ? if yes, can you share with us ?
BTW, ther's nothing restricting the length of the parameter you're talking about under the 1983 characters. this is simply non sense... !
|
|
|
|
|
The error that I was getting was, SE_ERR_ACCESSDENIED
The length limit is NOT nonsense. !
The following link describes the length restrictions on the parameter I am
talking about:
ShellExecute parameter limit.
I guess my 1983 char length string has the .exe file path name appended to
it taking the to total string length to > INTERNET_MAX_URL_LENGTH. Which is
why I was getting the error.
I've solved the problem now, using an intermediate file to get around any
command line length limits.
Thanks for the advice.
|
|
|
|
|
yes, and quoting it says :
If you are using the ShellExecute/Ex function, then you become subject to the INTERNET_MAX_URL_LENGTH (around 2048) command line length limit imposed by the ShellExecute/Ex functions. (If you are running on Windows 95, then the limit is only MAX_PATH.)
so...
|
|
|
|
|
Hi All,
I have another problem with calling manage code from dll.
I do the following:
1. Create dll project in the VS2005, add /clr option under project property->C++->general
2. Add header file to the project with interface:
<br />
#define Base_API __declspec(dllexport)<br />
<br />
class BaseI_SqlDbConnection;<br />
class Base_API Base_SqlDbConnection<br />
{<br />
public:<br />
Base_SqlDbConnection(); <br />
BaseI_SqlDbConnection *m_pi;<br />
};<br />
3. Add define of class to the .cpp file. It is the simple wrapper on the SqlClient.
<br />
using namespace System;<br />
using namespace Data;<br />
using namespace SqlClient;<br />
<br />
#ifdef _MANAGED<br />
#pragma managed(push, off)<br />
#endif<br />
BOOL APIENTRY DllMain( HMODULE hModule,<br />
DWORD ul_reason_for_call,<br />
LPVOID lpReserved<br />
)<br />
{<br />
return TRUE;<br />
}<br />
#ifdef _MANAGED<br />
#pragma managed(pop)<br />
#endif<br />
class BaseI_SqlDbConnection<br />
{<br />
public:<br />
BaseI_SqlDbConnection()<br />
: m_SqlDbConnection(gcnew SqlConnection){}<br />
<br />
gcroot<SqlConnection ^> m_SqlDbConnection;<br />
};<br />
Base_SqlDbConnection::Base_SqlDbConnection() : m_pi(new BaseI_SqlDbConnection)<br />
{<br />
}<br />
4. Call the class from MFC application looking like this:
Base_SqlDbConnection test;
With help of debugger, I found that the BaseI_SqlDbConnection()
constructor doesn't want to call and object m_SqlDbConnection could not be created.
I guess that the problem is in the managed code, but I am newbie for this. Please help
me to resolve the problem or point me to the article about this.
|
|
|
|
|
Hello,
I want to get a sample code of a server application that will be listening to a port, and track requests coming to that port.
Plz reply ASAP, if any one knows from where I can get this.
|
|
|
|
|
Have you searched here for "client server socket" articles? There's lots of them.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello,
I have recently started using COM classes with which I opened the MS Word application with VC++ code.
This I did by using Application class and calling CreateDispatch function of Application class
_Application app;
app.CreateDispatch("Excel.Application");
app.SetVisible(TRUE);
This was done after loading msword.olb.
But all this process doen't work for excel .I have xl5n32.olb in my Program Files directory .I don't have excel.olb.
So from where should I get excel.olb or How do I fix up the problem with xl5n32.olb
For excel app.SetVisible(TRUE) doesn't work.
Prithaa
|
|
|
|
|
I try to develop a listcontrol - like (icon mode), my problem now is I don't know how to draw a selected item as normal list control, selected item in list control (icon mode) looks darkener than normal item. An item contain a bitmap and a text string as normal list control item.
Could you please help me on this.
Thank you in advance.
|
|
|
|
|
Hi all ,
i m executing a ui thread and inside that thread there is a different ui thread starting and in that third ui thread starts.
Now what i want to know is if i close 1st thread by using PostThreadMessage like this
PostThreadMessage(WM_QUIT,NULL,NULL);
all the other threads which are called inside that thread are closed automatically or we have to close them explicitily.
thanks in advance
|
|
|
|
|
As I know, there is no concept said that there is parent thread and child thread, so you must close each thread explicility.
Thank you.
|
|
|
|
|
Hi
All
i used code from www.codeproject.com/menu/menuch.asp this link.I modify this code to display menu font in Marathi font. I can display menu items in marathi font, but i top menu are still in English, so if u have solution to this then please send me.
Thanks in Advance
Atul
Atool
|
|
|
|
|
How many times are you going to ask this question? If nobody replies you, there might be many reasons. You don't provide sufficient information, nobody understands what you are asking, or anything else similar. Try to explain in detail or split it into more specific parts, tell where you are facing a problem. Without doing anything, don't keep asking the same thing over and over.
These are links to the same question that you've been asking in the recent past..
Link 1[^] Link 2[^] Link 3[^] Link 4[^] ... and the list goes on.
This Link[^] is a must for you.
|
|
|
|
|
You said "if nobody replies you" but I think I answered
here[^]
|
|
|
|
|
|
How to display tooltip text for a button inside group box?
Best Regards,
Suman
|
|
|
|
|
Switch the tab order of the button and the group box.
It's not rocket surgery!
Within you lies the power for good, use it!!!
|
|
|
|
|
Am I missing something? I don't understand the question and your answer too. Can you please explain me in detail what the OP wants and what is your work around?
signature server failure
|
|
|
|
|
Because the OP has trouble getting a tool tip to show on a button, and he specifically said the button was contained inside a group box, I assumed the problem was related to the function WindowFromPoint() returning the group box, not the button in question. Swapping the z-order of the button and group box would fix the problem.
It's not rocket surgery!
Within you lies the power for good, use it!!!
|
|
|
|