#undef bool
#undef uint
-#undef Method _Method
-#undef Array _Array
-#undef byte _byte
-#undef int64 _int64
+#undef Method
+#undef Array
+#undef byte
+#undef int64
#if defined(ECERE_STATIC)
public import static "ecere"
virtual uint stdcall AddRef()
{
- return (uint)InterlockedIncrement(&_refCount);
+ return (uint)InterlockedIncrement((void *)&_refCount);
}
virtual uint stdcall Release()
{
- uint cRef = InterlockedDecrement(&_refCount);
+ uint cRef = InterlockedDecrement((void *)&_refCount);
if(cRef == 0)
delete this;
return cRef;
return MSCOM_IUnknown::QueryInterface(iid, ppvObj);
}
- virtual uint stdcall BandedDataCallback(uint lReason, uint lStatus, uint lPercentComplete, uint lOffset, uint lLength,
+ virtual uint stdcall BandedDataCallback(uint lReason, uint lStatus, uint lPercentComplete, uint lOffset, uint lLength,
uint lReserved, uint lResLength, byte * pbBuffer);
};
class WiaPropertyStorage
{
IWiaPropertyStorage *pWiaPropertyStorage;
-
+
bool ReadLong(const PROPSPEC *pPropSpec, uint *plResult)
{
bool result = true;
}
class ScanningProgress : Window
-{
+{
autoCreate = false;
text = "Scanning in progress. Please wait.";
borderStyle = fixed;
{
TempFile f { };
- uint stdcall BandedDataCallback(uint lReason, uint lStatus, uint lPercentComplete, uint lOffset, uint lLength,
+ uint stdcall BandedDataCallback(uint lReason, uint lStatus, uint lPercentComplete, uint lOffset, uint lLength,
uint lReserved, uint lResLength, byte * pbBuffer)
{
switch(lReason)
{
IWiaItem *pWiaItem;
- HRESULT DeviceDlg(HWND hWndParent, uint lFlags, uint lIntent, int * count, void * images)
+ HRESULT DeviceDlg(HWND hWndParent, uint lFlags, uint lIntent, LONG * count, void * images)
{
return (HRESULT)IWiaItem_DeviceDlg(pWiaItem, hWndParent, lFlags, lIntent, count, images);
}
{
List<Bitmap> result = null;
IWiaItem ** ppIWiaItem;
- int count;
+ LONG count;
Window window = ((GuiApplication)__thisModule.application).desktop.activeChild;
if(window) window = window.rootWindow;
GET_STIDEVICE_TYPE(nDevType) == StiDeviceTypeScanner)
{
PROPSPEC specDocumentHandlingSelect;
- LONG nDocumentHandlingSelect;
+ uint nDocumentHandlingSelect;
specDocumentHandlingSelect.ulKind = PRSPEC_PROPID;
specDocumentHandlingSelect.propid = WIA_DPS_DOCUMENT_HANDLING_SELECT;
if(scannerProp.ReadLong(&specDocumentHandlingSelect, &nDocumentHandlingSelect) &&
- nDocumentHandlingSelect & FEEDER)
+ (nDocumentHandlingSelect & FEEDER))
{
PROPSPEC specPages;
PROPVARIANT varPages;
-
+
specPages.ulKind = PRSPEC_PROPID;
specPages.propid = WIA_DPS_PAGES;
varPages.lVal = ALL_PAGES;
scannerProp.WriteMultiple(1, &specPages, &varPages, WIA_DPS_FIRST);
-
+
PropVariantClear(&varPages);
}
}
delete scannerProp;
-
+
nextPage = true;
while(nextPage)
{
{
GUID guidFormat = WiaImgFmt_BMP;
GUID preferredFormat;
- String format = "bmp";
+ const String format = "bmp";
PROPSPEC specPreferredFormat;
specPreferredFormat.ulKind = PRSPEC_PROPID;
Window window = ((GuiApplication)__thisModule.application).desktop.activeChild;
if(window) window = window.rootWindow;
if(!IWiaDevMgr_SelectDeviceDlg(devMan.pWiaDevMgr, window ? window.systemHandle : 0,
- StiDeviceTypeDefault, alwaysAsk ? WIA_SELECT_DEVICE_NODEFAULT : 0, 0, &pItemRoot))
+ StiDeviceTypeScanner /*StiDeviceTypeDefault*/, alwaysAsk ? WIA_SELECT_DEVICE_NODEFAULT : 0, 0, &pItemRoot))
{
result = { pWiaItem = pItemRoot };
}