|
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.
|
|
|
|
|
You must initialize the COM libraries in each thread to be able to use it. If you need to do multi-threading I would give up on VB and use C++.
|
|
|
|
|
If I use Microsoft Agent 2.0 com Interface for programming,
(Microsoft Visual C++6.0)
how can I add a button or CheckList on WordBalloon like Microsoft Office Assistants?
if you know,Can you tell me?
Thank you !
|
|
|
|
|
I have written a program using the MSComm Active X component.
Now I'm on the point that I want to make an install shield
for this program. What is the best way to do this when I want
to register the MSComm component to the OS automatically?
Any tips and tricks are welcome.
Regards,
J hn
|
|
|
|
|
What version of Installshield are you using?
|
|
|
|
|
install shield for Microsoft Visual C++ 6.0
|
|
|
|
|
Hi John,
I wrote program with MSCOMM, too.
But my program have problem in sending and recieving data !!!
Of course i use of SetOutput() and GetInput(),
But ...
Can you explain to me, why ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|