Click here to Skip to main content
15,909,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is there a fast method for doing this? Pin
pépé29-Aug-02 2:07
pépé29-Aug-02 2:07 
AnswerRe: Is there a fast method for doing this? Pin
chen29-Aug-02 2:14
chen29-Aug-02 2:14 
GeneralRe: Is there a fast method for doing this? Pin
pépé29-Aug-02 4:32
pépé29-Aug-02 4:32 
GeneralPlaying a wave or mp3 file in my program Pin
Mavrock28-Aug-02 19:12
Mavrock28-Aug-02 19:12 
GeneralRe: Playing a wave or mp3 file in my program Pin
Mazdak28-Aug-02 19:16
Mazdak28-Aug-02 19:16 
GeneralRe: Playing a wave or mp3 file in my program Pin
anju29-Aug-02 0:14
anju29-Aug-02 0:14 
GeneralRe: Playing a wave or mp3 file in my program Pin
mynab3-Sep-02 0:23
mynab3-Sep-02 0:23 
GeneralWindows Image Acquisition - Please help! Pin
Hiusing28-Aug-02 19:08
Hiusing28-Aug-02 19:08 
Hello,
I'm working on WIA and trying to aquire image/audio/video from a digital camera. Everything looks fine like select the device and image. However, I still not problem tranfering file from the camera to the target machine. What I want is transfer the file from the camera to a file in the target, then I would like to get the file name from a STGMEDIUM and move to another location. According to MSDN, I set lpszFileName member of the pMedium structure to NULL to allow WIA to determine the file name and location for the new file. However, pIWiadataTransfer->idtGetData always returns STG_E_MEDIUMFULL and IWiaEventCallback::ImageEventCallback never be called. Do you know why? Thanks!

IWiaDevMgr* g_pIWiaDevMgr = NULL;
if (SUCCEEDED(CoCreateInstance(CLSID_WiaDevMgr, NULL, CLSCTX_LOCAL_SERVER,
IID_IWiaDevMgr, (void**)&g_pIWiaDevMgr)))
{
IWiaItem* pIWiaRootItem = NULL;
if (g_pIWiaDevMgr->SelectDeviceDlg(m_hWnd, StiDeviceTypeDefault, 0, NULL, &pIWiaRootItem) == S_OK)
{
LONG lItemCount = 0;
IWiaItem** ppWiaItem = NULL;
if (pIWiaRootItem->DeviceDlg(m_hWnd, 0, WIA_INTENT_NONE, &lItemCount, &ppWiaItem) == S_OK)
{
CWaiDataCallback* pWaiDataCallback = new CWaiDataCallback;
pWaiDataCallback->AddRef();

for (int i = 0; i < lItemCount; i++)
{
#if 0 // Do I have to setup some parameters for WriteMultiple?
IWiaPropertyStorage* pIWiaPropStg = NULL;
if (SUCCEEDED(ppWiaItem[i]->QueryInterface(IID_IWiaPropertyStorage, (void**)&pIWiaPropStg)))
{
PROPSPEC PropSpec;
PropSpec.ulKind = PRSPEC_PROPID;
PropSpec.propid = WIA_IPA_FORMAT;
PROPVARIANT PropVar;
PropVar.puuid = &WiaImgFmt_BMP;
pIWiaPropStg->WriteMultiple(1, &PropSpec, &PropVar, 2);
pIWiaPropStg->Release();
}
#endif

IWiaDataTransfer* pIWiadataTransfer = NULL;
if (SUCCEEDED(ppWiaItem[i]->QueryInterface(IID_IWiaDataTransfer, (void **)&pIWiadataTransfer)))
{
STGMEDIUM StgMedium = { 0 };
StgMedium.tymed = TYMED_FILE;
if (pIWiadataTransfer->idtGetData(&StgMedium, pWaiDataCallback) == S_OK) // *** Always return STG_E_MEDIUMFULL
{
pIWiadataTransfer->Release();
ReleaseStgMedium(&StgMedium);
}
}
ppWiaItem[i]->Release();
pWaiDataCallback->Release();
}
CoTaskMemFree(ppWiaItem);
}
pIWiaRootItem->Release();
}
g_pIWiaDevMgr->Release();
}
GeneralRe: Windows Image Acquisition - Please help! Pin
Christian Graus28-Aug-02 20:43
protectorChristian Graus28-Aug-02 20:43 
GeneralInvalidateRect() Pin
alex.barylski28-Aug-02 17:57
alex.barylski28-Aug-02 17:57 
GeneralRe: InvalidateRect() Pin
.dan.g.28-Aug-02 21:25
professional.dan.g.28-Aug-02 21:25 
GeneralMicrosoft auto-generated comments Pin
redbomberman28-Aug-02 15:56
redbomberman28-Aug-02 15:56 
GeneralRe: Microsoft auto-generated comments Pin
Liam O'Hagan28-Aug-02 16:45
Liam O'Hagan28-Aug-02 16:45 
GeneralRe: Microsoft auto-generated comments Pin
alex.barylski28-Aug-02 17:24
alex.barylski28-Aug-02 17:24 
GeneralRe: Microsoft auto-generated comments Pin
Michael P Butler28-Aug-02 22:04
Michael P Butler28-Aug-02 22:04 
GeneralRe: Microsoft auto-generated comments Pin
Chris Losinger28-Aug-02 17:41
professionalChris Losinger28-Aug-02 17:41 
QuestionHow to create an edit box in code Pin
~~~~s28-Aug-02 15:33
suss~~~~s28-Aug-02 15:33 
AnswerHow to create an edit box in code Pin
~~~~s28-Aug-02 15:36
suss~~~~s28-Aug-02 15:36 
AnswerRe: How to create an edit box in code Pin
Christian Graus28-Aug-02 16:38
protectorChristian Graus28-Aug-02 16:38 
Generalpipe communication Pin
includeh1028-Aug-02 13:05
includeh1028-Aug-02 13:05 
GeneralRe: pipe communication Pin
Roger Stewart28-Aug-02 17:39
professionalRoger Stewart28-Aug-02 17:39 
GeneralRe: pipe communication Pin
Alois Kraus28-Aug-02 21:04
Alois Kraus28-Aug-02 21:04 
GeneralAdd/Remove of the function is impossible, because the parent class code is read only Pin
adamUK28-Aug-02 12:48
adamUK28-Aug-02 12:48 
GeneralProperty Sheet and CFormView Pin
Kash28-Aug-02 12:47
Kash28-Aug-02 12:47 
GeneralRe: Property Sheet and CFormView Pin
Chris Losinger28-Aug-02 12:52
professionalChris Losinger28-Aug-02 12:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.