|
Did you check msdn.microsoft.com for IE context menu? There are several articles on customizing IE.
|
|
|
|
|
You should look at IDocHostUIHandler, this is the "official" way to extend IE, like controlling the context menu.
|
|
|
|
|
Dear all
How can I get the MAC-address(physical address) from a host computer?
Thanks
|
|
|
|
|
Hi!
I am trying to write a COM exe server which hosts an activeX component. In other words, the client invokes methods in the COM exe which invokes methods on the activeX component.
I am using an ATL composite control for this. There are examples where this has been done, but the composite control is always invoked through an html page.
This is what I have done so far:
a. Create a new ATL COM app using the Appwizard and selected .exe option
b. Inserted a new ATL object (Composite control)
c. This gives me dialog box support into which I can add activeX components and other gui features.
d. The above was done since there is no MFC support present, so I cannot e.g create a dialog box, add the activeX component and then call DoModal() for this dialog in some other method.
So the problem is how to invoke the above dialog box?
thanks in advance
ab.
|
|
|
|
|
I really need help
Im working on a databaseinterface, witch will provide procedures with some parameters for the developer using C++.
The interface purpose will be to INSERT and UPDATE data to a MSDE database.
The client application should link to a dll file and then the have an function like this:
Newtest(Carnumber, Driver, Time, ..........)
The COM interface will then communicate with the MSDE database.
Im using ATL wizard Consumer to read tables and then making SQL questions with including Parameters.
The ATL Consumer Wizard can only Read one tabel, i want to make SQL questions to many diffrent tabels in the database how will i do that?
The consumer function produce a class i want a COM interface, how will i do this?
Help
|
|
|
|
|
You will have to manually add the other tables.
It should be easy to figure out by looking at the code provided by the wizard. The columns in the map are bound to the order in the SQL query.
BEGIN_COLUMN_MAP(CAccessor)
COLUMN_ENTRY(1, m_field1)
COLUMN_ENTRY(2, m_field2)
END_COLUMN_MAP()
SELECT column1, column2 FROM MyTable
JOIN MyTable2 ON ...
If you are unsure of parameters, etc., it maybe better to create a seperate consumer object and cut & paste what you need into one.
|
|
|
|
|
Thanks but
Aint there some smarter way to connect an application to a database. It must be some way that i can read the hole database into a COM object and then making some interface and every interface will have one funktion with SQL. I have trouble to find this sort off information on the webb.
|
|
|
|
|
Why don't you make a stored procedure? It will solve your problems, work with the wizards and increase performance of your application.
/WW
|
|
|
|
|
You mean that I should make the stored procedures in Access and then let the Wizard take care of it?
|
|
|
|
|
Stored procedure is "the right way" to accomplish these kind of tasks, but... I'm sorry to say that Access does not have support for Stored Procedures You have to use MSSQL or similar DBMSs
/WW
|
|
|
|
|
Hello everyone,
Well I m a novice into this JACOB API. I downloaded
the software which acts as a bridge b/w Java and COM.
Its downloaded from the website -
http://users.rcn.com/danadler/jacob/
Can anyone lend me a helping hand please?
But the main problem is that there is no
API DOCUMENTATION of JACOB to b precise apart frm MSDK
for Java/ Sun SDK for Java.
So if i want to know vich functions have to b used
and all how am I goin to find it out.
Can anyone please help me reg. this.
Also I downloaded this for I wanna call and use
functions of a COM dll viz. Win Media Player's DRM
API.
Its windows platform based. I wanna use that in java.
Anyone who has worked on that ? To give a brief intro
abt tht its basically a Digital rights manager for
securing streaming media in a B2B framework. I wanna
do tht urgently so please i request anyone to come out
with a helping hand for how to use JACOB and that API.
I wud b very grateful.
Thanking You,
Shamant - Java Developer.
|
|
|
|
|
Hello everyone,
I'm trying to access the activex parent object and am having some troubles. I would like my ATL control invoke the navigate() function of it's container (assuming the container is IE) so that the plugin causes IE to POST some data back to the server. I am having trouble finding any documentation on if this is even possible. Here is some code I have that doesn't seem to work:
HRESULT hr;
CLSID clsid; // Class ID of the object.
LPUNKNOWN punk = NULL; // Unknown of the object.
IWebBrowserApp* ppvObject = NULL; // interface to the object
hr = CLSIDFromString(L"Shell.Explorer.2", &clsid);
// Create an instance of the object and ask for its
// IDispatch interface.
hr = CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IUnknown, (void **)punk);
if (SUCCEEDED(hr)) {
hr = punk->QueryInterface(IID_IWebBrowserApp, (void**)&ppvObject);
if (SUCCEEDED(hr)) {
// Create POST Data to be sent out to the server
BSTR bstrURL = NULL, bstrHeaders = NULL;
VARIANT vFlags = {0},
vTargetFrameName = {0},
vPostData = {0},
vHeaders = {0};
bstrURL = SysAllocString(L"http://www.microsoft.com");
if (!bstrURL)
{//TODO: error handling
}
bstrHeaders = SysAllocString(L"Content-Type: application/x-www-form-urlencoded\r\n");
if (!bstrHeaders)
{ //TODO: error handling
}
V_VT(&vHeaders) = VT_BSTR;
V_BSTR(&vHeaders) = bstrHeaders;
hr = GetPostData(&vPostData);
//Send data out to the server
hr = ppvObject->Navigate(bstrURL, &vFlags, &vTargetFrameName, &vPostData, &vHeaders);
ppvObject->Release();
}
punk->Release();
}
}
HRESULT GetPostData(LPVARIANT pvPostData); // do some stuff to the data
Any Ideas what I'm doing wrong? This is probably going to open a random web connection, not the parent window. I think there has to be an easier way. and one that works!
thanks.
UPDATE: should I use AtlAxGetHost()??? If so, then how do i get the HWND?
|
|
|
|
|
I'm replying to myself so that if anyone else is trying to do this they won't go crazy like me. Here's what you need to do: (error checking omited)
IOleContainer* pContainer;
IServiceProvider* pService;
IWebBrowser2* pBrowser;
HRESULT hr;
hr = m_spClientSite->GetContainer(&pContainer);
hr = pContainer->QueryInterface(IID_IServiceProvider,(void**)&pService);
hr = pService->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2, (void**)&pBrowser);
Now... does anyone know how to make this work in Netscape using the npmozax.dll plugin?
-pos
|
|
|
|
|
How can an ATL in-proccess be client ,in a nother word how it can call another
Acticex Dll and wich is the best function can do that
|
|
|
|
|
MyActiveX::CallOther()
{
CoCreateInstance(YourActiveX);
// Not proper code, but you get the idea
}
|
|
|
|
|
Hi,
Could I use a smart pointer instead of CoCreateInstance(...)??
|
|
|
|
|
Yes, and you could also read a book or other documentation.
|
|
|
|
|
I develop application in VC++ I need to use com dll in another com dll,is it possible??
Thnks
|
|
|
|
|
Of course. If your module supports a dual interface add a header file created by MIDL compiler to the project and you can use the powerful of vtable. If your COM module implements only IDispatch you have to generate a class derived from COleDispatchDriver ( by ClassWizard).
|
|
|
|
|
Hello every1!
I am looking at some sample code that microsoft is giving out with MSDN and i can't understand what is going on...if some1 knows it...
Here's the problem - the project palmap(can be found in any MSDN library) is a dll file that is used as an extension of aviview(a prog for viewing avi files and also can be found in the MSDN). A part of the source of palmap.c says:
typedef struct {
IAVIStreamVtbl FAR * lpVtbl;
ULONG ulRefCount;
//
// instance data
//
PAVISTREAM pavi;
PGETFRAME pgf;
AVISTREAMINFO sinfo;
HPALETTE hpal;
LPBYTE lp16to8;
LONG lLastFrame;
LPBITMAPINFOHEADER lpdibLast;
} PALMAPSTREAM, FAR*PPALMAPSTREAM;
There is something sneaky in this struct since IAVIStreamVtbl is defined nowhere(i checked the headers and tried to see if any IDLs exist). I searched the whole project directory for that string and there is no match. It is obviously the vtable and also has an interface prefix but i don't find any interface definitions too. BTW: i tried to look for the definition by clicking with the right button on the "IAVIStreamVtbl" and choosing "Goto definition...." but there is no brosing files with that project. After building the project there are no errors or warnings. so - Where could this IAVIStreamVtbl be defined?
Thanks for any reply!
Vladimir Ralev
|
|
|
|
|
Look for a #import statement. Look for xxxx_i.h file after the compile.
|
|
|
|
|
Are there any good code samples available on this site (or elsewhere) that I can use to get idea of the workings of a COM+ application? I already have a pretty good textbook understanding of COM+.
Thanks for your help!
|
|
|
|
|
I have out parameter as IUnknown** on the server side method
Method(IUnknown** ptrIUnknown)
Now on the client side , how do i call the method
i declared
IUnknown* pIUnk;
Then I call some method
Method(&pIUnk);
but IUnknown pointer does not get filled up
what is the mistake in this ?
parag
|
|
|
|
|
hi
I want some good samples on aggregation ?Where can I find links for this?
please help
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
I am using visual basic to develop an application using a VB ActiveX dll I have created a multithreading tech. using window API function CreateThread(...) like this :-
------------------------This laid in XClass in the ActiveX dll-------------
lRet = CreateThread(0, _
0, _
AddressOf TheThread, _
0, _
0, _
lThreadID)
----------------------------This thread Function is laid in some module-------
Public Function TheThread(ByRef p As PARAMETER) As Long
On Error GoTo TheThread_Error
XClass.SpecialFunction Exit Function
TheThread_Error:
MsgBox ("TheThread had an error : " + Err.Description)
End Function
But there is a run time error message comes up say "CoInitialize has not been called"
Can some body help me.
Thanks.
|
|
|
|