|
We are doing a project doing a study on the posibility to make OpenOffice into a “webprogram”. This is similar to a web mail.
To describe the project better, the whole point is to be able to use OpenOffice anywhere in the world, with any web browser, any operating system etc. We currently have a web server to use for the server part. The Client part would be a web browser and that’s it. Similar to thin Client but better, where there will be no specific client installation.
The thing is, I am thinking on using Java Applets and using some ActiveX implementation. Maybe it could be done with just a plugin to the internet explorer im not shure.
Any leads and information on this is welcome.
MVH
Locktotten(Sweden)…
Locktotten...
|
|
|
|
|
I have a VC++ program in which two IScriptControlPtr smart pointers are created in thread "1". Thread "2" calls the Run() method against the first IScriptControlPtr, and thread "3" calls the Run() method against the second one. All three threads call CoInitializeEx(NULL,COINIT_MULTITHREADED) first.
What I am finding is, thread 2 (or 3) blocks until thread 3 (or 2) has finished, even though they are running against separate IScriptControlPtr objects (and no other thread is trying to access these smart pointers).
Has anyone seen this behaviour before / is this to be expected?
Is there perhaps bad multithreaded handling in msscript.ocx? (I am using version 1.0.0.7615).
Many thanks,
Neil.
|
|
|
|
|
The msscript.ocx control is registered with the Apartment threading model. This means it has affinity with the thread on which it is created - COM will force calls from a different thread onto the thread which created the object.
If you want to use multiple script controls concurrently, you should create them on the threads which will call their methods.
I'm not sure, but I think using COINIT_MULTITHREADED with an Apartment object will cause you to get a proxy to the object even though you're calling an object on the same thread.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks for your reply, Mike. I suspected this might be the case.
When you say "The msscript.ocx control is registered with the Apartment threading model" ... is this documented somewhere on the web? I spent some time searching, but don't recall that particular chestnut It might be nice to have some definitive documentation for once, rather then relying on Google and trial and error!!!!
|
|
|
|
|
It's not documented on the web AFAIK, but ActiveX controls are almost always registered with the Apartment threading model (although you'll see some not marked at all, therefore running on the primary thread, and some marked Both). An ActiveX control (as opposed to a component) is intended for use on a window.
As for how msscript.ocx is registered, I used regedit and searched HKEY_CLASSES_ROOT\CLSID for that filename.
I never asked why you're not just using the script engines directly. This page[^] suggests which you should use when.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
The reason I didn't use the script engines directly is - I didn't know about them! I am just a beginner with this to be honest. Thanks for bringing it to my attention, it definitely looks like the way to go.
cheers,
Neil
|
|
|
|
|
I have an app in which I want to be able to inspect the headers coming in to IE. Through a little research, I've determined that I need to use IBindStatusCallback and IHttpNegotiate to accomplish this. I've derived my COM object including these two interfaces and have implemented them. In my FinalConstruct(), I call RegisterBindCallback(). My problem is that none of the methods of the above two interfaces appear to be called. is anyone familiar with these methods? What am I missing?
Thanks.
|
|
|
|
|
i want to Build a screen saver which should terminate when i move the mouse or press key board button. During the execution of the screen saver its dialog painting should change with different colors and pattern with a specified time interval.
|
|
|
|
|
i want to store some records on disk using iostream.h
these records are about persons. i have to store pictures of persons and then i want to retrieve/search these records. and show the picture on the dialog. can some one help me in doing this
|
|
|
|
|
Can any one tell me that how can i call a com / Activex function via javascript and vbscript. Currently i am doing some thing as follows but in web page i get the error that object doesnt support this property or method :
<body>
<object id=MUMSocket1 style="LEFT: 0px; TOP: 0px" classid="clsid:BDBEED17-BE31-475E-966F-28A3F07FDBBD" VIEWASTEXT>
</object>
<input type="button" value="Button" id=button1 name=button1 onclick=ini()>
<script language ="javascript" >
function ini()
{
MUMSocket1.Initialize ()
}
</script>
</body>
|
|
|
|
|
hi
What you have done to call the ActiveX function is correct only. This is the way to call a com object function on client side thru html-jscript. If still it shows err, the two possibilities that I found are
1) Mostly it will be because of your security settings of Internet explorer. Did u get any message saying "Your current security settings prohibit running activex controls on this page ........". If yes, then no method will get executed. Go to Internet Options--> Security tab--> Custom Level and select all ActiveX related radio buttons to 'Enable'. Open a new explorer window and try. Mostly the problem will be because of this only.
2) Second possibility is, make sure that the component with the given clsid have that method exposed. Search registry for that clsid under HKEY_CLASSES_ROOT\CLSID and go to your clsid. Then go to InprocServer32 SubKey, check the default string value, this will give you the path of the component registered for that clsid. Check whether that dll/ocx has the given function exposed (By referring that dll/ocx to a new vb project or by using OLE Object viewer). Because even if u r sure that the component has that method, the client machine might have an older version installed.
rgds..mil10
|
|
|
|
|
I am a learner and I ve got a COM.
I try to learn the structure of the COM, and then did three steps to add a function to the COM and its Interface:
1. In DECLARE_INTERFACE_(ITest4, IUnknown), I added a fuction like this:
STDMETHOD(ChangeTest) (THIS_
int nToBeChanged
)
PURE;
2. In the CTest4 declaration I added:
STDMETHODIMP ChangeTest(int nToBeChanged);
3. In the CTest implement I appended :
HRESULT CNvRender::ChangeTest(int nToBeChanged)
{
m_nChangeNo = nToBeChanged;
::MessageBox(NULL, "fasdf", "hehe",MB_OK);
return 0;
}
4. register it and get the interface pointer in my file:
ITest4 *p;
......(get the pointer p and check it whether it is valid)
p->ChangeTest(2);
and here the problem arise: Access Violation
What's wrong with it ? I need your help.
|
|
|
|
|
I write spam filter and want validate senders from address book. But some versions of outlook show a warning message. Is it possible to bypass it?
Thanks.
================================
My products are here!
|
|
|
|
|
hi
Ya... This is a security alert, since Service Pack 3 for Outlook XP. If any program tries to access Outlook address book it will display that alert msg. ASAIK there is no way to disable this. Most of the mail attachment script viruses are using this address book to spread. So after the launch of ‘I LOVE U’ virus (it is the first one in this series) Microsoft released this patch. All these address entries are there in our hard disk as .WAB files. But it is encrypted and we can’t read it directly.
Otherwise try some brute force approch - find that Out look warning display dialog, select that chkbox and click the 'Yes' button programatically using keybd_event or SendInput API.
rgds...mil10
|
|
|
|
|
Can any one tell me that how can i call a com / Activex function via javascript and vbscript. Currently i am doing some thing as follows but in web page i get the error that object doesnt support this property or method :
<HTML>
<BODY>
<OBJECT id=MUMSocket1 style="LEFT: 0px; TOP: 0px" classid="clsid:BDBEED17-BE31-475E-966F-28A3F07FDBBD" VIEWASTEXT>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
<INPUT type="button" value="Button" id=button1 name=button1 onclick=ini()>
<script language ="javascript" >
function ini(){
MUMSocket1.Initialize ()
}
</script>
</BODY>
</HTML>
|
|
|
|
|
hi
What you have done to call the ActiveX function is correct only. This is the way to call a com object function on client side thru html-jscript. If still it shows err, the two possibilities that I found are
1) Mostly it will be because of your security settings of Internet explorer. Did u get any message saying "Your current security settings prohibit running activex controls on this page ........". If yes, then no method will get executed. Go to Internet Options--> Security tab--> Custom Level and select all ActiveX related radio buttons to 'Enable'. Open a new explorer window and try. Mostly the problem will be because of this only.
2) Second possibility is, make sure that the component with the given clsid have that method exposed. Search registry for that clsid under HKEY_CLASSES_ROOT\CLSID and go to your clsid . Then go to InprocServer32 SubKey, check the default string value, this will give you the path of the component registered for that clsid. Check whether that dll/ocx has the given function exposed (By referring that dll/ocx to a new vb project or by using OLE Object viewer). Because even if u r sure that the component has that method, the client machine might have an older version installed.
rgds..mil10
|
|
|
|
|
Hi all;
I am having a serious problem with an application that I am currently developing. It is an SDI application consisting of a CdialogBar (Well, some sort of derivation of that class atually). I have to initialise tabs and add list controls and tree controls on them.
This works just fine as I have added initialisation code to the InitDialogBar() function that I have created for the DialogBar. The problem is that I need to fill these controls (list and tree) dynamically. This can only happen when users log onto the program. InitDialogBar() is triggered well before user log-in.
So I have created a function in the DialogBar class to add/remove unnecessary items in the controls when user log-in. I use a global pointer to access this function in the login-dialog stuff. However, I always get the following assertion error:
AFXWIN_INLINE HICON CWnd::SetIcon(HICON hIcon, BOOL bBigIcon)
{ ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd,
It occurs in line 309 of AfxWin2
Obviously, it is requiring a handle to the DialogBar but I just can’t figure out how to make it work as I am quite new to Visual C++ programming.
Can somebody, please please help me.
Thank you,
Krugger
|
|
|
|
|
I registered a COM named "red.ax", and then
1. DEFINE_GUID
2. add the red.lib into the 'link' page
3. CoCreateInstance it.
but it get error when linking:
hehefaintDlg.obj : error LNK2001: unresolved external symbol _CLSID_NvRender4
is it has something to do with the .lib ?
How could I get through it?
|
|
|
|
|
try to include _i.c and .h files
I want to change Myself..Can u help me?
|
|
|
|
|
I've resolved the problem.
it was Init_guid.h havent been included.
|
|
|
|
|
I've read the docs and a few online examples of how to implement the ISAXContentHandler interface. Simple enough.
In my "stdafx.h" file, I make sure to add the following two lines.
import <msxml4.dll>
using namespace MSXML2;
Cool, I then created a class derived from ISAXContentHandler, call it ContentHandlerBase. I implemnted each of the ISAXContentHandler methods such that they all return S_OK. Then, I created a class that derived from ContentHandlerBase, call it ContentHandlerImpl. In this class I only implemented one method, say ISAXContentHandler::startElement for example.
As soon as I tried to instantiate this class via ContentHandlerImpl* chi = new ContentHandlerImpl(), I got "Cannot Instantiate Abstract Class" along with a whole bunch of ...
HRESULT MSXML2::ISAXContentHandler::raw_ignorableWhitespace(unsigned short *,int)' : pure virtual function was not defined
for example, for each of the ISAXContentHandler methods even though they HAVE been implemented in the base class.
I don't get, it. I downloaded an online sample and it compiled fine. Laboriously poring over the differences between my code and the sample code has proved fruitless as I can't see anything I did wrong
Anybody have any clues as to what might be the problem?
Thanks.
Senkwe
Woke up this morning...and got myself a blog
|
|
|
|
|
Try to use "raw_interfaces_only" attibute in import statement or rename methods in your implementation class ("raw_XXX").
Edward
|
|
|
|
|
Hi, thanksk alot for the response Unfortunately, your suggestion doesn't seem to work. I've already tried including "raw_interfaces_only", didn't work I'm afraid. I've just now tried your "raw_XXX" suggestion and I still got the same compile error.
Thanks again for the suggestions though
Woke up this morning...and got myself a blog
|
|
|
|
|
That's strange.
What's in *.tlh/*.tli files ?
Your derived classes should match interfaces in the *.tlh files.
Also try to remove all tlh and tli files and rebuild all.
Edward
|
|
|
|
|
Hi Edward. Thanks for the reply again. I took a peek at the projects *.tlh file and my eyes glazed over so I deleted it and rebuilt all. Same thing happened. Looks like I'm going to have to dig into the file and look for anything odd. Thanks for your help I'll post this problem to another newsgroup as I'm sure someone must have experienced this before.
Woke up this morning...and got myself a blog
|
|
|
|