|
Why don't you opt for a normal Dll for Autoupdate.exe. Expose a function say "UpdateApp(...)" from that Dll, and it will have 2 parameters as you said.
Whenever you have to update/upgrade/change the EXE/module, call that function of DLL.
Please tell me whether my understanding is wrong.
|
|
|
|
|
Yeah,That will be fine.
Rohit
|
|
|
|
|
Hi
When I pass VARIANT data type throught COM+ event I am getting null data on client. My Event interface I have defined like this
[id[],mehtod("")] HRESULT OnNewClient(VARIANT pVal);
On client side I have tried in _ATL_FUNC_INFO structure VT_ARRAY|VT_BYREF, VT_RECORD|VT_ARRAY|VT_BYREF, VT_BYREF|VT_VARIANT but nothing seems to be working. The client side method I have declared like this
void __stdcall NewClientLoggedIn(VARIANT *pVal); For passing VARIANT data type do I have to modify Fire_OnNewclient(VARIANT pVal) method. Please help in understanding this.
Thanks in Advance
Girish
Girish Nadig
girish_nadig@yahoo.com
|
|
|
|
|
I've created this simple managed c++ class library:
namespace pkFactorialLib
{
public __gc __interface IFactorial
{
int ComputeFactorial(int n);
};
public __gc class Factorial : public IFactorial
{
public:
Factorial()
{
}
public:
int ComputeFactorial(int n)
{
int intFactorial=n;
for(int i=1; i
|
|
|
|
|
Hi, all
recently i'm planing to make an ie plugin to prevent some(not all) scripts running on ie, or even disable download them from the web, i notice norton antivirus 2003 has some kind of function like that -- script blocking. i originally considered the BHO, but there isn't any events about for script running. anybody can let me know that? thanks.
|
|
|
|
|
Hello !
I have some experience with com/webbrowser/mshtml. Recently I run into a very interesting problem, and after spending some days on it(no success) I decided to try geting some answers from other programmers.
So: I wrote a simple browser helper object. On a machine without internet access, when detecting BeforeNavigate2 event, I redirect navigation. For example, if the user enters http://www.google.com, i redirect to http://mygateway/page.aspx?url="http://www.google.com".
This works fine, the problem is I can't redirect the location of the objects in the document (objects; images; flash; etc), and the page can not load them.
I couldn't find an event that fires when a resource download begins, and a mechanism for redirecting these downloads. (please note that implementing a download manager dows not solve this problem; dm objects are invoked only when the user explicitly selects "download targer..." from the context menu for example).
Please let me know if you have any ideas ( is it possible ? is it not ? a source for more info -> i've already read all I could find in msdn and microsoft on this topic and got no answer ).
I don't need specific code / code samples, I only need a hint on how to do it. I'm not interested in parsing the html code and modifying the links. pages may contain flash/applets, and i can't parse them to change the links. I need browser redirection.
As soon as I'll solve this problem, I'll post the project (no mfc; no atl; just pure C++/Com).
All the best,
psangeljg
ps. I did find a solution, but it's not what I want. I figured that mshtml uses wininet (wininet.dll) to access the resources. I could write my own wininet.dll that calls the actual wininet.dll, changing the urls. However, I try to avoid this soultion, since wininet.dll varies with the os version. Performance is also important.
|
|
|
|
|
The problem is most likely due to relative urls.
You need to rewrite all urls in the orignal document to absolute urls.
|
|
|
|
|
Yep, just like Stefan said.
You can obtain a pointer to the HTML document you have loaded after you get the documentComplete event. Trough that pointer you can get and set for example the sources of the images or objects found on the page.
|
|
|
|
|
that's similar to parsing; you can't manage activex controls, links embedded in flash objects and the like;
this works only for good old fashioned html, and that's not the case here;
I need a tool that can handle any web page; the solution I implemented after one week of searching for alternates was using proxy server.
That's also what igor1960 proposed, and it seems to me it's the only answer. Writing a proxy server is not a very complicated task, so it is an acceptable solution.
|
|
|
|
|
Maybe there is way to do that by setting proxy server?.
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
yes, this is the way I handled the problem in the end. Thanks for your post !
|
|
|
|
|
My problem is: -
I want to access a COM server on a remote machine. I can do it if my local as well as remote machines have been logged on as local administrators. But the moment, I log on as diffrent users, let's say, user1 on local machine and user2 on remote machine OR vice-versa, I get the error "
DCOM got error "General access denied error " from the computer p40217010 when attempting to activate the server:
{263B5191-4822-45D6-9C14-C95C10753764}
"
Firstly I passed 0 for COAUTHINFO in the COSERVERINFO structure,
then I populated COAUTHINFO structure as per MSDN documentention thinking not to use authentication at all to get rid of the problem. But unfortunately this also didn't work.
I can understand that some authentication (security) issue is there, but which issue??
I've been facing this DCOM related problem for last two days.
I would be grateful to you if you could please throw some light to this issue or suggest me some reading stuff to get over this problem
Warm Regards,
Pankaj
|
|
|
|
|
Hi Dears
I've created an Exchange 2000 Store Event Sink in Visual C++ using
______________________________________________________
http://support.microsoft.com/default.aspx?scid=kb;en-us;288156
------------------------------------------------------
I've also created a COM+ Event Sink Application usin
________________________________________________________
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/wsst_create_a_com_event_sink_application.asp
--------------------------------------------------------
Now I have to register my "Event Sink"
There is some guidance on thr URL
___________________________________________________
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/wsst_registering_an_event_sink.asp
---------------------------------------------------
But I think it's for Visual Basic not for Visual C++ implementation
Please help me...................
I'll be very grateful to you.
Kind Regards
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
Hi,
I have a java application. It communicates with a VC dll, using JNI. This dll launches IE, using CoCreateInstance(). When I aceess the IWebBrowser2 pointer, I have received from CoCreateInstance(), it works fine for the first time. But when I try to access it (for invoking navigate2()), I get an error with code 0 (ERROR_SUCCESS). Can you tell me what is wrong? What is the meaning of ERROR_SUCCESS? Am I missing any initialization? Is some method needs to be called in every JNI method? Is this happening because the launched browser is a separate process, something outside the scope of a JVM?
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_ALL, IID_IWebBrowser2, (void**)&m_spBrowser);
- Nikhil
|
|
|
|
|
you should take a look at http://www.microsoft.com/com/resources/comdocs.asp
you'll find there micrososft's com specifications. It will take a few hours to read, but if you are not very confident with com initialization, allocation techniques, common client / server implementations, etc, you will find that very useful.
As for your specific question: be sure to use CoInitialize / uninitialize when loading/unloading com.
Also, note that any memory passed thru com interfaces must be allocated and freed using com specific mechanism (like ComTaskMemAlloc), and certain rules for doing this apply. (depending on the type of the variable: in, out, in/out, etc).
Another thing to keep in mind is that all strings passing thru Com interfaces are Unicode strigs (aka OLESTR, array of unsigned chars).
Are you using the internetexplorer with / without graphical interface ? (background or as an activex control in your user interface ?).
It seems to me that you are not using the user interface, case in witch you should stick with MSHTML only, and use url monikers to load web pages for parsing and other tasks.
Please post more of your code and/or some more details to help us figure out what's wrong with the picture.
Angel
|
|
|
|
|
// firstly define interface
IEnumString* pEnumStr;
...
|
|
|
|
|
Hi
I have a ATL COM Object derived from IDispatch.When i create this object i need to attach a windows handle to this object so that i can handle windows messages.
Pls help.I will be grateful if anybody helps me with sampl code or links.
Thnks in advace
Ram
|
|
|
|
|
Hello cberam,
I'm not sure what is the difficulty you are facing. You can certainly obtain the windows handle via a parameter of a method.
Once you have a valid Windows Handle, you can use the Get/SetWindowLong() APIs (with GWL_WNDPROC as the 2nd parameter) to hook its window procedure.
The most important part of this system is that the ATL COM Object must be housed inside a DLL. This is because your windows procedure must reside in the same executable module as the Window Handle.
Does the above help ? If so, I'll see if I can spare some time to write some startup code for you.
Best Regards,
Bio.
|
|
|
|
|
In your question, you said: ATL COM Object derived from IDispatch but if you plan to attach a window handle to this object, you should consider a FULL ActiveX control. You can then use: Project->Add To Project->Components and Controls to insert an MFC wrapper class for your control. If you can't, maybe source code is not available or whatever the other reason. You may write it yourself...
class CMyWindowWrapper : public CWnd
{
public:
void CreateObject() { m_pYourOjbect.CreateInstance(__uuidof(IYourObject)); }
void MyWrapper_Method1() { m_pYourObject->Method1(); }
void MyWrapper_Method2(BSTR text) { m_pYourObject->Method2(text); }
protected:
CComPtr<IYourObject> m_pYourObject;
};
ÿFor the bread of God is he who comes down from heaven and gives life to the world. - John 6:33
|
|
|
|
|
this is a reminder especially for STEVE S, perhaps he didn't notice
my lasts posts in the thread
"programming autocad : GetAttributes"
12:29 12 Aug '03
JPG
|
|
|
|
|
Hi,
I have a VC++(console)/ATL Script host app in which i create COM objects(say for Buttons) dynamically .I like to handle events for these Objects.Will it be possible for to handle events using IConnectionPoint/Sinks ?. Or this is possible only for in case of MFC app.Pls help me.Should i need to migrate from Console to MFC?
Thnks
Ram
|
|
|
|
|
Hello cberam,
>> Will it be possible for to handle events using IConnectionPoint/Sinks ?.
Yes.
>> Or this is possible only for in case of MFC app.Pls help me.
>> Should i need to migrate from Console to MFC?
No need, cberam. Just use the normal connection point/sink mechanism.
Regards,
Bio.
|
|
|
|
|
There is a substantial number of ActiveX controls implementing graph/chart.
All of them are "output" controls, i.e. they draw graph using data from
a client application.
But I'm now interested in an "input" control, i.e. control allowing user
to draw a graph (by creating/deleting/moving points) and providing this
user input to the clien application.
Does such stuff exist and how can I get it?
I suspect that some of "output" graph controls may be "input" controls
as well, but up to now I failed to find such.
|
|
|
|
|
Hi Dears
I want to develop a MS Word Addin. The main functionality of this addin is:
--> I have to convert a MS Word file (.doc) into (.pdf) file format.
What should I take as first step to implement this functionality.
Kindly guide/help me in the form of some code/link.
I'll be grateful to you.
Kind Regards
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
The PDF writer (a virtual printer which is part of the Adobe product line) does exactly this. It installs itself like any other printer driver and thus appears when you print a word document (and in fact any other document from any other application with printing capabilities).
RSS feed
|
|
|
|