|
Hi!
how can i load a webpage from some url in to my application using c and sockets.
Thankx
=-=-=-=-=-=-=-=-=-=
Inayat Ali
=-=-=-=-=-=-=-=-=-=
|
|
|
|
|
normally u should use CInternetSession.
if socket, does the server side send the page and allow u connect to the socket pipe?
includeh10
|
|
|
|
|
|
Hello to everybody,
I have added wit the wizard 2 methods for my ActiveX :
PutNumber (ULONG uNumber)
PutData (BYTE* pData )
I compile the application and I run the ActiveX to test it with the Container of Visual Studio. I have set two stop points in both methods. When I invoke the first method, it works well. It goes inside the function but when I try the second one it doesn't work...I think it is a problem that pData is a pointer cause I have created several methods to test it and it doesn't work only when I use a pointer.
Please Help
Thanks
Javi
|
|
|
|
|
Check out the data type converion ur using, coz u might be passing some other datatype n while using pointers always chekout type conversion.
|
|
|
|
|
hi
i wrote a function which conjnects me to an online mysql database from my app. when i use the function from a win32 console application, all is well. when i port the same function to my mfc application, it gives all sorts of linker errors saying that there's a conflict between libc.lib and mysql++.lib. putting libc.lib or libcmt.dll in the ignore library list from the settings does not help.
anybody have any idea ? you guys ever used mysql++ from an mfc application ? if yes please give me the project settings and a few snippets ....
thanks in advance.
kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
www.coderkane.com
|
|
|
|
|
Did you compile MySQL++ yourself, or download a precompiled version? If you compiled the latest version yourself, and you used the provided .vcproj, it should have built with the Multithreaded DLL version of the C run-time.
The default configuration for a Win32 Console Application is to use the single-threaded static library CRT. The default for an MFC application is to use the multithreaded DLL. You can't mix-and-match within an application - if you're going to use the MFC DLL you must use the CRT DLL.
The home page[^] suggests that before version 1.7.16, the single-threaded static CRT was used.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks for the help Mike!
i downloaded my mysql++ from this website only, i downloaded the precompiled "ancient" version because i have visual studio 6 with service pack 6. my mysql++ version is 1.7.1 the page says that newer versions won't build with vc++6..what do u suggest i should do ? Can i compile the lib with borland c++ and use it in my vc++ projects ? or is it absolutely necessary for me to upgrade..?
kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
www.coderkane.com
|
|
|
|
|
I use pipes with CreateProcess(), but my code works well on win98 and doesn't work on XP.
only special code for XP in my app looks like:
=========================
void*psd=0;
LPSECURITY_ATTRIBUTES psa=0;
DWORD bNT=(GetVersion()<0x80000000)?1 ;
if(bNT)
{
psd=::GlobalAlloc(GPTR,SECURITY_DESCRIPTOR_MIN_LENGTH);
::InitializeSecurityDescriptor(psd,SECURITY_DESCRIPTOR_REVISION);
::SetSecurityDescriptorDacl(psd,-1,0,0);
psa=(LPSECURITY_ATTRIBUTES)::GlobalAlloc(GPTR,sizeof(SECURITY_ATTRIBUTES));
psa->nLength=sizeof(SECURITY_ATTRIBUTES);
psa->lpSecurityDescriptor=psd;
psa->bInheritHandle=1;
}
const BOOL bOK=CreateProcess(0,pszCmdLine,psa,0,1,0,0,0,&si,&pi);
//======================================
do i need more special code for XP?
thx
includeh10
|
|
|
|
|
includeh10 wrote:
doesn't work on XP.
Define "doesn't work." Are you getting a compiler/linker error, a runtime error, a fired assertion, or a thrown exception?
includeh10 wrote:
void*psd=0;
Shouldn't this be:
PSECURITY_DESCRIPTOR psd = 0; includeh10 wrote:
::SetSecurityDescriptorDacl(psd,-1,0,0);
I'm not sure of the behavior of this function when bDaclPresent is neither 0 nor 1.
includeh10 wrote:
const BOOL bOK=CreateProcess(0,pszCmdLine,psa,0,1,0,0,0,&si,&pi);
What happens if you call this function with lpProcessAttributes set to NULL ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
"doesn't work" means that messages do not exchange between pipes at all, the dos app respones for command in CreateProcess(), after that, communication stops.
i will test ur suggestion.
includeh10
|
|
|
|
|
DavidCrow wrote:
What happens if you call this function with lpProcessAttributes set to NULL?
lpProcessAttributes!=0 is commented by docs, which say it is special for NT.
if lpProcessAttributes=NULL, it is the same (works on Win98 but not on XP).
I had many apps which use code above and work well on all platform - but they are Windows apps, not DOS one.
i can not find reason why the code has trouble on DOS app.
by the way, PSECURITY_DESCRIPTOR is just void*, some people define many sick definitions.
thx
includeh10
|
|
|
|
|
includeh10 wrote:
lpProcessAttributes!=0 is commented by docs, which say it is special for NT.
I see it saying that the handle cannot be inherited and the process gets a default security descriptor. In any case, ...
includeh10 wrote:
if lpProcessAttributes=NULL, it is the same (works on Win98 but not on XP).
Which should indicate to you that the following code has no bearing on the problem:
DWORD bNT=(GetVersion()<0x80000000)?1:0;
if(bNT)
{
psd=::GlobalAlloc(GPTR,SECURITY_DESCRIPTOR_MIN_LENGTH);
::InitializeSecurityDescriptor(psd,SECURITY_DESCRIPTOR_REVISION);
::SetSecurityDescriptorDacl(psd,-1,0,0);
psa=(LPSECURITY_ATTRIBUTES)::GlobalAlloc(GPTR,sizeof(SECURITY_ATTRIBUTES));
psa->nLength=sizeof(SECURITY_ATTRIBUTES);
psa->lpSecurityDescriptor=psd;
psa->bInheritHandle=1;
} Remove this and the problem becomes more refined. By removing unnecessary code, you'll eventually get down to just the few lines that are necessary to demonstrate the problem.
includeh10 wrote:
by the way, PSECURITY_DESCRIPTOR is just void*,
Fair enough, but it would make more sense to others if PSECURITY_DESCRIPTOR were used. There's also the (small) possibility that it may change from void* in the future.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello!
I need to interface my VC++ application with Outlook Express 6.0.
I'd need:
- access to email messages in Outlook folders,
- eventually, copy email messages in other files (with EML format and other
place);
- make email messages and send them with Outlook Express (Outbok).
I found a very useful sample on codeproject.com (made by Pablo Yabo), about using IStoreFolder and IStoreNamespace to manage Outlook Exp folders.
But ... what about outgoing emails? The sample can just make a "streamed" file, that's not sent by Outlook Express.
Do I need to use IMimeMessage interface?
Is there any sample that show the use of IMimeMessage interface?
Thank you in advance!
Chiara
|
|
|
|
|
|
|
|
|
Great!!!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I use the RTC Client API v1.3 SDK
Configurations & Setup:
=======================
- OS = Windows XP, Windows 2000, 32-bit environments
- Build = Build all the files in Platform SDK Environment by
running nmake
How to use nmake?
|
|
|
|
|
Start by reading MSDN[^].
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I make an dexit dialog but when i press ok it only close the exit dialog but it dosen't close the aplication what i make wrong.Thanks for helping me.
void CPractica6Dlg::OnClose()
{
if(MessageBox("Exit?","Bye",MB_YESNO)==IDYES)
CDialog::OnClose();
}
|
|
|
|
|
I reply myselft if any one has this problem may be can solve by this way
void CPractica6Dlg::OnClose()<br />
{<br />
if(MessageBox("¿Quieres salir de la aplicacion?","Bye",MB_YESNO)==IDYES)<br />
CPractica6Dlg::EndDialog(IDYES);<br />
<br />
}<br />
|
|
|
|
|
|
I wan to make a simple calculator with 3 edit box 2 of them to insert the values and the other for the result. Mi problem is that when i insert the numbers and make the operation the storage the values and in the next operation i can't change it.This is what i wrote.Thanks for your help.
void CPractica6Dlg::OnMultiply()
{
UpdateData(TRUE);
m_result=m_numA*m_numB;
}
void CPractica6Dlg::OnCalculate()
{
UpdateData(FALSE);
}
|
|
|
|