|
first of all thx very much. B U T;) isn't a 'usual' com object like one created with ATL the same as an ActiveX?
I created a com object, used ATL, connection point Notify and I get the event 'Notify' in vb, c++ but not in IE with javascript or vbscript. the com object is locally installed and registered.
I try to catch event like this:
<script language="vbscript" for="MyComInstance" event="Notify">
alert( "ev " )
</script>
but nothing happens
thx
|
|
|
|
|
The syntax you are using is for HTML page events, not sinking COM events.
You have to create the COM object instance from the web page in order for the web page to receive it's events. Then you can write event handlers.
For example,
If the COM object is already registered locally then you can use code like this (substitute the CLSID for your actual class):
-------------------------------------------------------------------------------------------
<head>
<OBJECT ID=MyCOMObject CLASSID="CLSID:BC89547C-9CC5-445D-A960-567B9B9AB93A"></OBJECT>
<SCRIPT LANGUAGE = "VBScript">
Sub MyCOMObject_Notify()
'Add code here to process your notification event
Msgbox "Trapped Notification"
End Sub
</SCRIPT>
</head>
-------------------------------------------------------------------------------------------
The COM object in this case is always loaded by the OBJECT tag when the web page loads, and unloaded when the web page unloads.
This may not be what you want. If the COM object already exists, what you have to do is write a second object that the web page can load. This second object must contain code that gets a reference to the running COM object, as well as code that allows it to act as a proxy in the web page for relaying the events from the original COM object.
Robert
|
|
|
|
|
hi and thx again,
I tried it again and again, but it don't work!!! I added a messagebox inside the Fire_Notify() method inside the com object and it seems that the IE sink is not registered in my object. the code will not jump in the "for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)"
loop where pDispatch->Invoke is called.
So I think IE simply doesn't register for events (no call for the advise stuff)! I DON'T KNOW WHY!!! anyone who knows how to force IE to do it?
thx
|
|
|
|
|
I would be grateful for help on this problem.
I have a DCOM application running on a client computer, which is started by a process on a server computer. It is important that this application only runs on the clients. The DCOM application is started by calling CoCreateInstanceEx() and an event sink is started using DispEventAdvise(). This works 100% once DCOMCNFG is used to set the launch and access permissions.
On a terminal services setup, the clients run all the processes on a server computer, except for this one DCOM app. When starting the process, the DCOM app starts as expected on the client computer, but when starting the sink, DispEventAdvise() returns 0x80070005 or E_ACCESSDENIED. I cannot find what security setting that I might need to drop in order to remove this problem and I have been pulling my hair out on this matter for some time.
Any assistance would be warmly received.
|
|
|
|
|
Has anyone been successful in executing the
Win32_OperatingSystem class method "Reboot" or "Shutdown" from a call to the ExecMethod routine in C++. This method works fine using VBScript. But in C++, the method returns an error in ExecMethod - WBEM_E_INVALID_METHOD_PARAMETERS.
Why ?
Here is my code :
...
HRESULT hr;
CComPtr<IWbemLocator> pLocator;
CComPtr<IWbemServices> pServices;
CComBSTR bstrPath = L"//";
bstrPath.AppendBSTR(bstrComputer);
bstrPath.Append(L"/root/cimv2");
CComBSTR bstrObject = L"Win32_OperatingSystem";
CComBSTR bstrMethod = L"Win32Shutdown";
CComBSTR bstrLanguage = SysAllocString(L"WQL");
CComBSTR bstrQuery = SysAllocString(L"select * from Win32_OperatingSystem where Primary=true");
CComBSTR bstrFlags = L"Flags";
CComBSTR bstrReserved = L"Reserved";
hr = CoInitializeEx(0, COINIT_MULTITHREADED);
if (FAILED(hr))
{
cout << "Failed in CoInitializeEx" << endl;
return hr;
}
hr = CoInitializeSecurity(
NULL,
-1, // COM negotiates service
NULL, // Authentication services
NULL, // Reserved
RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
NULL, // Authentication info
EOAC_NONE, // Additional capabilities
NULL // Reserved
);
if (FAILED(hr))
{
cout << "Failed in CoInitializeSecurity" << endl;
CoUninitialize();
return hr;
}
//get the initial namespace of the CIM Object Manager
hr = pLocator.CoCreateInstance(__uuidof(WbemLocator), 0, CLSCTX_INPROC_SERVER);
if (FAILED(hr)){
cout << "Failed in CoCreateInstance" << endl;
return hr;
}
//create an instance for the interface that connects WBEM services
hr = pLocator->ConnectServer(bstrPath, NULL, NULL, NULL, 0, NULL, NULL, &pServices);
if (FAILED(hr)){
cout << "Failed in ConnectServer" << endl;
return hr;
}
//authenticate to the service, using current credentials
hr = CoSetProxyBlanket(pServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
if (FAILED(hr)){
cout << "Failed in CoSetProxyBlanket" << endl;
return hr;
}
//query WMI for objects: get the Win32_OperatingSystem class using WQL
CComPtr<IEnumWbemClassObject> pEnumWbem;
hr = pServices->ExecQuery(bstrLanguage, bstrQuery, WBEM_FLAG_FORWARD_ONLY, NULL, &pEnumWbem);
if (FAILED(hr)){
cout << "Failed in ExecQuery" << endl;
return hr;
}
//for each returned object call Win32Shutdown
IWbemClassObject* pWbemObject;
DWORD nRetObjects;
pEnumWbem->Reset();
while (pEnumWbem->Next(WBEM_INFINITE, 1, &pWbemObject, &nRetObjects) == S_OK)
{
CComPtr<IWbemClassObject> pClass;
CComPtr<IWbemClassObject> pMethod;
CComPtr<IWbemClassObject> pInParams;
CComPtr<IWbemClassObject> pOutParams;
//get the class definition of Win32_OperatingSystem
hr = pServices->GetObject(bstrObject, 0, NULL, &pClass, NULL);
if (FAILED(hr))
{
cout << "Failed in GetObject" << endl;
pWbemObject->Release();
return hr;
}
//get our method
hr = pClass->GetMethod(bstrMethod, 0, &pMethod, NULL);
if (FAILED(hr))
{
cout << "Failed in GetMethod" << endl;
pWbemObject->Release();
return hr;
}
//create a new object for in parameters
hr = pMethod->SpawnInstance(0, &pInParams);
if (FAILED(hr))
{
cout << "Failed in SpawnInstance" << endl;
pWbemObject->Release();
return hr;
}
//add parameters
CComVariant var;
V_VT(&var) = VT_I4;
V_I4(&var) = (short)nAction;
hr = pInParams->Put(bstrFlags, 0, &var, CIM_SINT32);
if (FAILED(hr))
{
cout << "Failed in Put" << endl;
pWbemObject->Release();
return hr;
}
//call Win32Shutdown with our action
hr = pServices->ExecMethod(bstrObject, bstrMethod, 0L, NULL, pInParams, &pOutParams, NULL);
if(hr == WBEM_E_INVALID_METHOD_PARAMETERS){
cout << "That's it" << endl;
}
if (FAILED(hr)){
cout << "Failed in ExecMethod" << endl;
pWbemObject->Release();
return hr;
}
pWbemObject->Release();
}
Code Red
|
|
|
|
|
We have some in-house Mfc ActiveX controls that need to have transparency (fully opaque to fully transparent) applied to them. We need to be able to see the background (container)
underneath them. I got some code working .... sort of. The problems looks
to be that the container was not drawing the background under the activex
controls. So my control that had some transparency code in it (using
AlphaBlend() of the GDI extended library) would combine its own color or
bitmap with white, the containers color under the control. That's what it
looks like to me.
Another thing is that my code works if the control is run in the ActiveX
control test container of VS6 or VS7 if I resize the control. I placed a
non-related control also on the test container just to be able to "see"
something underneath my control. If I resize mine and have some alpha value
like 50% then I can see the other control.
-SJ
|
|
|
|
|
SJ,
I worked on controls like this a while ago. You need to make your control 'windowless' and get access to the control's parent member "m_pClientSite" via the following code:
LPOLECLIENTSITE YourCOntrol::GetClientSiteMember()
{
return COleControl::m_pClientSite;
}
once you do that, you need to tell the parent to 'refresh' the drawing area when your controls needs it. That is done by using the following code:
IOleInPlaceSiteWindowless* pSiteWindowless = NULL;
GetClientSiteMember()->QueryInterface(IID_IOleInPlaceSiteWindowless,(void **)&pSiteWindowless);
if(pSiteWindowless)
{
pSiteWindowless->InvalidateRgn(NULL, true);
}
else
{
InvalidateControl();
}
That is the starting poing, there are other items you may need to be aware of, such as when your control is 'm_bInPlaceActive' or not and maybe more details need to be addressed depending on the functionality(rendering) of your control.
I would really like to hear how, or if that works, and any other info you came accross while implementing that.
-JL
|
|
|
|
|
I was wondering about the windowless aspect. Does layered windows play a part with this? Thanks for the feedback I will try what you suggested.
-SJ
Manufacturing Software Developer
Hewlett-Packard Company
|
|
|
|
|
Its been a while since I have been able to get back to this code but here I am.
Ok, to keep things simple I created a basic Windowless control that subclasses nothing. To cause the control to update I added a left mouse click handler in the control. I understand that IOleInPlaceObjectWindowless interface will redirect this mouse click from the container back to the control because since the control now has no window of its own it cannot handle the mouse message by itself. Because of the interface now it can. I added it so that I can manually cause the control to be updated therefore causing its OnDraw() method to be called.
So far so good. Then I put your code which calls the method MyControl::GetClientSiteMember() in the left mouse click handler. That works too.
How did you make sure the container had a valid window before calling any functions that report back stuff related to it's window handle? For example, calling GetClientRect() should get the rect for the control but I believe it uses the containers window handle or something like that. If I put GetClientRect in the control's OnDraw() is get an unhandled exception, basically the m_hWnd == NULL.
The whole thing im trying to do is draw a border around the control, draw a few shapes inside the control area rect and allow the container's background underneath the control to show through.
MSDN's Providing Windowless Activation talks about common examples of using windowless controls as having transparent controls. Text is painted but not the control background. They give no further direction as far as I could find.
Your help is appreciated but I think I need a little more direction.
BTW, in case you were wondering, I have successfully created a few MFC and one ATL ActiveX controls (windowed) and they work fine. But they are not transparent nor transluscent.
-SJ
Manufacturing Software Developer
Hewlett-Packard Company
|
|
|
|
|
Two Items:
1) Yes, the windowless control's 'window' is the parents window. GetClientRect should return the contorls size, not its location. When drawing the control, you could get the position/location of your control by using the passed in paramater "rcBounds".
[OnDraw(CDC* pDC, const CRect& rcBounds, const CRect& rcInvalid)]
It may not be necessary, for your control to be windowless. Depending on your needs, you may want to process OnEraseBkgnd function and return 1. This will tell the framework that you have taken care of the drawing/erasing of the background.
2) Second idea, again depending on your needs this may or may not work. Its an ALT 3.0 component and will demonstrate a transparency effect.
Do the following:
a) create an ALT COM component via "Alt COM Wizard" in Visual Studio MFC (I used VC++ 6.0 with MFC)
b) when specifying the control atrributes, unselect the 'Opaque' option (see figure: http://www.microsoft.com/msj/0299/atl3Activex/atlfig12.gif[^])
c) Add a ALT control to your project "Full Control"
d) Process the following messages WM_ERASEBKGND and WM_MOUSEMOVE (OnEraseBkgnd & OnMouseMove)
e) Declare a CPoint member variable name it "m_Point"
f) Drop in the following code for the OnDraw, OnEraseBkgnd and OnMouseMove funstions:
HRESULT OnDraw(ATL_DRAWINFO& di)
{
CString strTemp;
RECT& rc = *(RECT*)di.prcBounds;
//Set Background for text the be transparent
SetBkMode(di.hdcDraw, TRANSPARENT);
//Format Mouse Position Text
strTemp.Format("X: %d Y: %d ",m_Point.x,m_Point.y);
SetTextAlign(di.hdcDraw, TA_CENTER|TA_BASELINE);
LPCTSTR pszText = strTemp;
TextOut(di.hdcDraw, (rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2, pszText, lstrlen(pszText));
return S_OK;
}
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return 1;
}
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
m_Point.x = (short)LOWORD(lParam);
m_Point.y = (short)HIWORD(lParam);
HWND hParent = GetParent();
/*For better results, Determine the controls RECT and pass it in the InvalidateRect() fucntion below,
doing this this will result in only your control being redrawn, rather than having your parents entire rect be redrawn and result in flashing/blinking */
::InvalidateRect(hParent, NULL, true);
return 0;
}
Hope that helps you out a bit.
|
|
|
|
|
Hi,
Is it possible to create a com-addin , which can sync contacts,calender and tasks with the remote database using webservices.
The client side addin should be capable of interacting with the server component(typically webservice) which talks to the database.
the addin which sits on the client machine(outlook) should do the following.
1) provide automatic and manual sync ( Configurable)
2) provide UI for configuration
3) scheduling (incase of automatic sync)
4) perform conflict resolution ( data between the database and the outlook items)
last but not least!
is com-addin is the solution , or i have another best option?
Thanks in advance.
|
|
|
|
|
am having 2 problems. First problem has the highest priority. I mean I want to solve my first problem first ASAP.
1.) I am working with powerpoint Automation. Using VB Macro I have to call a function from a dll. This called function in turn has to call another function from another dll. I have been able to call the function from the first dll (using vb macro). Whats my problem is that I m not able to call the function(in second dll) from the first dll. I am using __declspec(dllexport) in the second dll and __declspec(dllimport) in the first dll. I think what I m missing here is that I don't know how to tell the first dll that which dll it shud consider for the called function.
My first dll is for keyboard hooking and second for displaying MS Agent. Can neone help me.
2.) Also, further if anyone can guide me about how to do mouse hooking???
|
|
|
|
|
well for mouse hooking you can use CBT hooks if I remember , see in MSDN for that.
I am still studying your first problem,
May be i will reply in another 10 minutes..
Regards
Tarundeep Singh Kalra
************************
www.tarunsadhana.com
************************
All men die. Not all men really live”. - “Braveheart”, 1995
|
|
|
|
|
Hi technojewel,
As i understand you are using dll in VB and your dll has some exported functions using __declspec(dllimport)...
If you are exporting functions using __declspec(dllimport), dont expect that VB will understand it (It will give an error Bad Calling Convension ).
Insead you should use WINAPI and .def file for exporting functions.
I thing it may help u !
Cheers,
Vishal
|
|
|
|
|
Hello guys, I'm trying to make a client/server .NET com+ application... My com+ class is done and enterprise services really knows it like com+ but when I try to "Export" this application at enterprise services it just enables me to Export as Server Application and I want to Export as Application Proxy.
How to export a .NET COM+ class at enterprise services as an application proxy or how to make this communication beteween 2 pcs.
Thanks...
Wender Oliveira
.NET Programmer
|
|
|
|
|
Hello,
I am getting very unique problem till now I haven't got any solution for this problem. I am describing the problem hope I will get solution from you.
I have created one ATL COM Component, this in turns call a third party library API which provide mapping solution. The main work of this COM Component is to create dynamic map upon request. I made this component to work with our ASP.net application. For testing purpose I have created a Standalone application in C# also. In my development machine this ATL COM Component runs fine with standalone application as well as in ASP.net Application. It instantiates then it instantiates third party 7Cs API. Checks for Registration of third party 7Cs API then do the other job.
But When I install this application in other machine this dll as well as application (Both StandAlone as well as ASP.Net) after registering the 7Cs Library and their data. The standalone application runs fine and do its work but through ASP.Net Web Application it hangs on the first API which checks the library has valid registration. It did not return from the function. The same thing runs fine from my development machine with both type of application. But fails in other machine with Web Application.
I thought it was permission problem under ASP.Net execution I have given all permission but still the problem persists.
Can any body give me any tips as I know you all people are very intelligent in your respective field.
Regards
Anuj Mishra
Software Engineer
|
|
|
|
|
Is there a way to find out more about the cause of the failure?
It used to work but not anymore.
It did that to me on two different computers.
The file other.dll doesn't get copied to C:\WINNT\system,
so myX.dll cannot be registered (since it depends on it).
See CAB, INF file and error log below...
Thanks!
-----------------
CAB FILE CREATION
-----------------
CabArc.exe n myX.cab other.dll myX.dll myX.inf
--------
INF file
--------
[Version]
; This section is required for compatibility on both Windows 95 and Windows NT.
Signature="$CHICAGO$"
AdvancedInf=2.0
[Add.Code]
other.dll=other.dll
myX.dll=myX.dll
[other.dll]
file-win32-x86=thiscab
FileVersion=1,0,0,1
DestDir=10
RegisterServer=no
[myX.dll]
file-win32-x86=thiscab
clsid={98B6686C-EF56-4FFF-ACBD-2BC5A853377D}
FileVersion=1,0,0,1
RegisterServer=yes
------------
IE Error log
------------
*** Code Download Log entry (02 Mar 2005 @ 14:34:52) ***
Code Download Error: (hr = 8007007e) The specified module could not be found.
Operation failed. Detailed Information:
CodeBase: file:///C:/Dev/myX/myX.cab
CLSID: {98B6686C-EF56-4FFF-ACBD-2BC5A853377D}
Extension:
Type:
LOG: Item other.dll being processed.
--- Detailed Error Log Follows ---
LOG: Download OnStopBinding called (hrStatus = 0 / hrResponseHdr = 0).
LOG: Item other.dll being processed.
LOG: Item myX.dll being processed.
LOG: URL Download Complete: hrStatus , hrOSB:1, hrResponseHdr , URL:(file://C:\Dev\myX\myX.cab)
LOG: File C:\WINNT\Downloaded Program Files\myX.dll being registered.
ERR: Setup Failed Error Code: (hr) = 8007007e, installing: myX.dll to (null) destination code(0)
LOG: Reporting Code Download Completion: (hr:8007007e (FAILED), CLASSID: 98b6686c..., szCODE:(file:///C:/Dev/myX/myX.cab), MainType:(null), MainExt:(null))
|
|
|
|
|
I'm being driven slowly mad trying to figure out how to make this function work!
I have a word document that I have in memory, and place this in an IStream derived class.
When I try to BindIFilterFromStream, the Stat method in my class is called, then BindIFilterFromStream returns E_FAIL. It doesn't seem to even inspect the data held in the stream.
Are there some special values I need to set during Stat?
Does this function even actually work?
|
|
|
|
|
i m building COM components in VC++ using ATL lib.
I want to dyanamically create listboxes on my dialog.
I hav tried using classes in "atlcontrols.h" but dont know which Window handle to pass to get the list box on dialog.
Same with Static text boxex n edit boxes.
Can u plz try n give me some soln .
Gaurav Jain
K.K. Wagh Institue of Engineering Education and Research,
Nashik,
Maharashtra,
India.
gauravjain911@yahoo.com
|
|
|
|
|
I have written a c# utility that monitors the status of a running application. The running application (lets call it ABC.EXE) exposes a com interface and I can obtain information such as the active customer number etc.
The first problem I had was that if I attempted to create a new ABC object it would automatically execute the ABC.EXE if it wasn’t already running. I managed to fix this by checking for the presence of the window (findwindow) beforehand.
However, the user may have more than one instance of ABC.EXE running, and I only want to communication with a specified one.
I’m a bit stuck on this. Any help appreciated.
|
|
|
|
|
Dear friends,
I have created a project in VB having MSFlexgrid. I have to fill records to that grid by VC code(ATL component). So how I get the reference of that grid in VC. Please help me.
|
|
|
|
|
Hello I am new to COM,OLE,AUTOMATION,ActiveX in Vc
so please provide me the difference among each there as well as their purpose
Thanks
Fahad Bilal
|
|
|
|
|
hi!!
im trying to create a Schema rowset as i want to display the tables existing in the database.
but im geting a Windows Error Report as soon as i execute getrowset function. Im building a COM using ATL.
any help is welcome.
STDMETHODIMP Cfuctcont::pop()
{
// TODO: Add your implementation code here
DBPROP InitProperties[5], InitProperty[3];
DBPROPSET rgInitPropSet;
IDataInitialize * pDataInit = NULL;
IDBInitialize * pDataSourceIDBInitialize = NULL;
IDBCreateSession * pSession = NULL;
IDBProperties * pProperties = NULL;
IDBCreateCommand * pCreateCommand = NULL;
ICommand * pCommand = NULL;
ICommandProperties * pCommandProperties = NULL;
ICommandText * pCommandText = NULL;
IOpenRowset * pOpenRowset = NULL;
IRowset * pRowset = NULL;
IRowsetChange * pRowsetChange = NULL;
IDBSchemaRowset * pSchemaRowset =NULL;
WCHAR wszProvider[] = L"MSDASQL"; // The Provider string
CLSID clsid;
HRESULT hr= S_OK;
// Init OLE and set up the data
CoInitialize(NULL);
// Setting up all the properties
// a) Setting up the Intitialization properties
for(long i=0;i<5; i++)
{
InitProperties[i].dwOptions = DBPROPOPTIONS_REQUIRED;
InitProperties[i].colid = DB_NULLID;
InitProperties[i].dwStatus = DBPROPSTATUS_OK;
}
// Data source string.
InitProperties[1].dwPropertyID = DBPROP_INIT_DATASOURCE;
InitProperties[1].colid = DB_NULLID;
InitProperties[1].vValue.vt = VT_BSTR;
InitProperties[1].vValue.bstrVal = SysAllocString(L"user");
InitProperties[4].dwPropertyID = DBPROP_INIT_OLEDBSERVICES;
InitProperties[4].vValue.vt = VT_I4;
InitProperties[4].vValue.lVal = DBPROPVAL_OS_ENABLEALL;
rgInitPropSet.guidPropertySet = DBPROPSET_DBINIT; // the property set
rgInitPropSet.cProperties = 5; // # of properties being set
rgInitPropSet.rgProperties = InitProperties; // array of DBPROP structures
// b) The Rowset properties
InitProperty[0].dwPropertyID = DBPROP_CANFETCHBACKWARDS;
InitProperty[1].dwPropertyID = DBPROP_IRowsetLocate;
for(i=0;i<2; i++)
{
InitProperty[i].dwOptions = DBPROPOPTIONS_REQUIRED;
InitProperty[i].colid = DB_NULLID;
InitProperty[i].dwStatus = DBPROPSTATUS_OK;
}
// 1. Data Source Initialization
hr = CoCreateInstance(CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, IID_IDataInitialize, (void**)&pDataInit);
// Creating the IDBInitialize
hr = CLSIDFromProgID(wszProvider, &clsid);
hr = pDataInit->CreateDBInstance(clsid, NULL, CLSCTX_INPROC_SERVER, NULL, IID_IDBInitialize, (IUnknown**) &pDataSourceIDBInitialize);
// Setting the Initialization properties
hr = pDataSourceIDBInitialize->QueryInterface(IID_IDBProperties, (void**)&pProperties);
hr = pProperties->SetProperties(1,&rgInitPropSet);
hr = pDataSourceIDBInitialize->Initialize( );
hr = pDataInit->Release();
hr = pProperties->Release();
//session creation
hr = pDataSourceIDBInitialize->QueryInterface(IID_IDBCreateSession, (void**)&pSession);
hr = pDataSourceIDBInitialize->Release();
IUnknown *pUnkSession =NULL;
hr = pSession->CreateSession(NULL, IID_IOpenRowset, &pUnkSession);
IDBSchemaRowset * pIDBSchemaRowset = NULL;
// pUnkSession->QueryInterface(IID_IDBSchemaRowset, (void**)&pIDBSchemaRowset);
pSession->Release();
IUnknown * pUnkCommand = NULL;
IOpenRowset * pIOpenRowset = NULL;
WCHAR wszTableName[11] = {0};
DBID TableID;
IUnknown *ppUnkRowset;
IUnknown *ppRowset;
VARIANT rest[]={VT_EMPTY,VT_EMPTY,VT_EMPTY,VT_EMPTY};
::MessageBox(NULL,"Helooo",NULL,MB_OK);
const ULONG cProperties = 2;
DBPROP rgProperties[cProperties];
DBPROPSET rgPropSets[1];
// rgPropSets, cProperties, rgProperties);
//DBPROPSET* pPropSet, ULONG cProperties, DBPROP* rgProperties)
rgPropSets->rgProperties = rgProperties;
rgPropSets->cProperties = cProperties;
rgPropSets->guidPropertySet = DBPROPSET_ROWSET;
rgProperties[0].dwPropertyID = DBPROP_CANFETCHBACKWARDS;
rgProperties[1].dwPropertyID = DBPROP_IRowsetLocate;
for(i=0;i<2; i++)
{
rgProperties[i].dwOptions = DBPROPOPTIONS_REQUIRED;
rgProperties[i].colid = DB_NULLID;
rgProperties[i].dwStatus = DBPROPSTATUS_OK;
}
hr = pSchemaRowset->GetRowset (
NULL,
DBSCHEMA_TABLES,
0,
NULL,
IID_IRowset,
1,
rgPropSets,
&ppRowset);
if(hr==S_OK)
::MessageBox(NULL,"ok",NULL,MB_OK);
if(hr==DB_S_ERRORSOCCURRED )
::MessageBox(NULL,"HI",NULL,MB_OK);
if(hr==DB_S_ASYNCHRONOUS)
::MessageBox(NULL,"HI1",NULL,MB_OK);
//if(hr==DB_S_NOTSINGLETON )
//::MessageBox(NULL,"HI2",NULL,MB_OK);
if(hr==E_FAIL )
::MessageBox(NULL,"HI3",NULL,MB_OK);
if(hr==E_INVALIDARG )
::MessageBox(NULL,"HI4",NULL,MB_OK);
if(hr==E_NOINTERFACE )
::MessageBox(NULL,"HI5",NULL,MB_OK);
if(hr==DB_E_ABORTLIMITREACHED)
::MessageBox(NULL,"HI6",NULL,MB_OK);
if(hr==DB_E_ERRORSOCCURRED)
::MessageBox(NULL,"HI7",NULL,MB_OK);
if(hr==DB_E_NOAGGREGATION)
::MessageBox(NULL,"HI8",NULL,MB_OK);
if(hr==DB_E_NOTFOUND )
::MessageBox(NULL,"HI9",NULL,MB_OK);
if(hr==DB_E_NOTSUPPORTED)
::MessageBox(NULL,"HI10",NULL,MB_OK);
if(hr==DB_SEC_E_PERMISSIONDENIED)
::MessageBox(NULL,"HI11",NULL,MB_OK);
if(hr==DB_E_OBJECTOPEN )
::MessageBox(NULL,"HI12",NULL,MB_OK);
if(hr==E_OUTOFMEMORY )
::MessageBox(NULL,"HI13",NULL,MB_OK);
::MessageBox(NULL,"HIsfsf",NULL,MB_OK);
return S_OK;
}
thanking you.
Gaurav Jain
K.K. Wagh Institue of Engineering Education and Research,
Nashik,
Maharashtra,
India.
gauravjain911@yahoo.com
|
|
|
|
|
could you please help me in finding fft scale factor in Magnetic resonance Dicom images fromo the header information.
|
|
|
|
|
Greetings,
A dicom Server project contains several complete iods. I believe one is the mri iod.
|
|
|
|
|