|
I need to do a simple HTTP POST from a c++ application.
The aim is to upload data to my webservice.
If someone could please give me a small sample program, or just point me in the direction of a decent library that i could use, it would be greatly appreciated.
|
|
|
|
|
Refer to the following links:
Libcurl[^]
Curlupp[^] (Based on libcurl)
Comparison of libcurl with other libraries: [^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
modified on Wednesday, May 21, 2008 5:19 AM
|
|
|
|
|
curl is perfect, thank you
|
|
|
|
|
Could have directed you to Soap tollkit 3.0[^], but it is deprecated recently. Probably, you need to use .net.
Or can still use Soap toolkit, without support.
|
|
|
|
|
Hi All,
I basically use this to load/display a .jpg file.
if (OleLoadPicture(pStream,dwSize,FALSE,IID_IPicture,
reinterpret_cast<LPVOID *>(&m_pPicture)) != S_OK)
{
pStream->Release();
return 10;
};
pStream->Release();
This code is working fine for most of the files with all the .jpg files with RGB Color mode.
But for a .jpg file created with CMYK(Cyan, Magenta, Yellow, KeyColor-Black) color mode, I am not able to open the file, I get the error "E_NOINTERFACE - The object does not support the interface specified in riid(IID_IPicture in the function)." - Unable to get the image interface.
Kindly help!
Thanks.
Priya Sundar
|
|
|
|
|
Hi Friends,
I am using .NET component in VC 6.0 MFC application.
I created tlb file for .NET using RegAsm.exe and importing it in my MFC application.
(I referred this link http://support.microsoft.com/kb/828736).
Its working fine in my system.But the problem is it wont work on other systems.
I installed VC++ 6.0 & VS 2005 (.Net Framework)both on my system.
But other systems are only installed with VC++ 6.0.
Is it necessary to install .Net framework, If yes what all to install, which version?
Please help me..
Reagards
Shiva
|
|
|
|
|
When I wrote:
Bitmap *p=new Bitmap(w,h);
In debug mode, it reports an error(VC9):
error C2660: 'Gdiplus::GdiplusBase::operator new' : function does not take 3 arguments
Though, I've include mygdiplus.h instead of gdiplus.h .
Here is the content of mygdiplus.h (copied from msdn), what's the problem?
#ifndef _MY_GDIPLUS_H_
#define _MY_GDIPLUS_H_
#define iterator _iterator
#ifdef _DEBUG
namespace Gdiplus
{
namespace DllExports
{
#include <GdiplusMem.h>
};
#ifndef _GDIPLUSBASE_H
#define _GDIPLUSBASE_H
class GdiplusBase
{
public:
void (operator delete)(void* in_pVoid)
{
DllExports::GdipFree(in_pVoid);
}
void* (operator new)(size_t in_size)
{
return DllExports::GdipAlloc(in_size);
}
void (operator delete[])(void* in_pVoid)
{
DllExports::GdipFree(in_pVoid);
}
void* (operator new[])(size_t in_size)
{
return DllExports::GdipAlloc(in_size);
}
void * (operator new)(size_t nSize, LPCSTR lpszFileName, int nLine)
{
return DllExports::GdipAlloc(nSize);
}
void operator delete(void* p, LPCSTR lpszFileName, int nLine)
{
DllExports::GdipFree(p);
}
};
#endif // #ifndef _GDIPLUSBASE_H
}
#endif // #ifdef _DEBUG
#include <gdiplus.h>
#undef iterator
#endif
modified on Wednesday, May 21, 2008 2:48 AM
|
|
|
|
|
See here[^]. BTW, took me 5 seconds to find it with google
|
|
|
|
|
I've followed the advice, but still error in VC9 project.
I've tested using #pragma message , and found that the code after
#ifndef _GDIPLUSBASE_H<br />
#define _GDIPLUSBASE_H
doesn't compile.
I include mygdiplus.h before some other header files, now it works.
modified on Wednesday, May 21, 2008 3:12 AM
|
|
|
|
|
check whether somewhere (may be in " stdafx.h ") <gdiplus.h> is included before "mygdiplus.h".
|
|
|
|
|
No gdiplus.h in stdafx.h , I think it may be included by some header file.
|
|
|
|
|
well, I said may be in stdafx.h, seems you solved now, but then in your previous post you said it didn't work if you include above some other header files.
|
|
|
|
|
|
hai all,
I wrote an application that do some schedule task creation, It works smooth in XP machine, It does not create schedule task in vista,but that i solved by adding the manifest file... My new problem is my application is blocked when it invoked at startup(login or reboot time)...
Pleaser help me if u have any idea ..
Thanks
|
|
|
|
|
After migarating the project to VC9.0, I forgot to initializie for Gdiplus.
====================
CCoolTower::CCoolTower(UINT nIDBmp)
: m_bmp(AfxGetInstanceHandle(),MAKEINTRESOURCEW(nIDBmp))
{
m_rtDev.Width=m_bmp.GetWidth();
m_rtDev.Height=m_bmp.GetHeight();
}
modified on Wednesday, May 21, 2008 4:59 AM
|
|
|
|
|
followait wrote: m_bmp(AfxGetInstanceHandle(),MAKEINTRESOURCEW(nIDBmp))
check why loading of bitmap failed, might not be the constructor issue. move the m_bmp creation statement to normal function (not constructor) and verify why it is failed check the error value. And as a side note, use MAKEINTRESOURCE inplace of MAKEINTRESOURCEW.
|
|
|
|
|
MAKEINTRESOURCE not work, the constructor:
Bitmap(HINSTANCE hInstance,const WCHAR *bitmapName);
In VC6.0 the code;
Bitmap *p=new Bitmap(AfxGetInstanceHandle(),MAKEINTRESOURCEW(nIDBmp));
works fine.
modified on Wednesday, May 21, 2008 3:24 AM
|
|
|
|
|
ok, that's correct, but what about checking the status, Image::GetLastStatus.
|
|
|
|
|
HINSTANCE h=AfxGetInstanceHandle();
m_pBmp=new Bitmap(h,MAKEINTRESOURCEW(nIDBmp));
When debuging into the code, the function below returns NULL:
void * (operator new)(size_t nSize, LPCSTR lpszFileName, int nLine)
{
lpszFileName;
nLine;
return DllExports::GdipAlloc(nSize);
}
|
|
|
|
|
ok, use a temporary variable,
Bitmap bmp(h,MAKEINTRESOURCEW(nIDBmp));
Status gdiSts = bmp.GetLastStatus();
may be GDI+ is not initialized.
|
|
|
|
|
Yes, after migrating, I forgot to initialize GDI+.
|
|
|
|
|
Hi to all
i am using Date Time picker control
at run time i am selecting date and month , and storing this date to somewhere else.
i have one another date & month which is already there in my programme.
then i am comparing both dates , if both dates are not equal then Message Box pops up telling that "stored date & selected dates are not equal "
This is working fine.
But if i select month from the arrow button which is available in calender, then dates are keep on going ,so many message boxs are coming, how can i avoid it ?
or
can i hide that arrow button ?
varun
|
|
|
|
|
what about you compare the date only at DTN_CLOSEUP Notification if you already got DTN_DROPDOWN notification, that is you compare the date only when calender is closed if the calender is opened by the user.
|
|
|
|
|
Hi all,
I want to clean my registry like i want to delete all the items from my registry which are not in use but are occupying spcae. I want to do this through coding....
Can anybody give me any idea to how to do it????
Thanks in advance
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: Can anybody give me any idea to how to do it????
By using the registry API. For example, RegDeleteKey() and RegDeleteValue() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|