|
Hello!
I am trying to write a web application that allow me to search and view outlook 2003 calendars.
so far I have only been able to read my own calendar information via the Microsoft.Office.Interop.Outlook 11 in a console application.
do any one have an idea of how I could search other peoples calendar ? and how to do it in a console application would be fine too
so what I am trying to do is really
1. logon a outlook account
2. read other peoples calendar <-- where I am
3. upload the results to a web application so other can view them and search them
Thanks in advance
modified on Wednesday, January 28, 2009 4:07 AM
|
|
|
|
|
Hi all,
I want to pass a userdefined structure using variant from a COM client to COM server. Can any one help me?...
Regards
Arun
|
|
|
|
|
You need to use idl file. Refer this[^] article by ioannhs_s.
|
|
|
|
|
Thanks for the reply.
I already got this article.But recordinfo failure occurs at that time.
Do u have any example?.
Now i can pass the structure to the COM server without using VARIANT.
|
|
|
|
|
Arun Menon wrote: But recordinfo failure occurs at that time
What kind of error is this?
Arun Menon wrote: Now i can pass the structure to the COM server without using VARIANT.
As said earlier and shown in article, use idl to declare structure as interface. You can use it as function parameter.
|
|
|
|
|
Hi all
I've searched and searched but I can't find a method that will enable me to intercept requests from a WebBrowser control and then provide my own, programmatically generated responses.
Currently, my application uses the control to provide 90% of the UI by loading HTML, CSS and Javascript from disc using the "file" protocol. The scripts then call my app's dispatch interface to make things happen.
What I would like to be able to do is effectively serve these files without coding my own HTTP server. I'm hoping there's a point at which I can intercept the WebBrowser's request and then write my own response back to it. This response will usual consist of the contents of a file extracted from an archive or from the app's resources.
I would also like to be able to spot requests for images (by parsing the URL) so that I can render SVG graphics to a file as a PNG (or similar) and stream that file back to the browser.
So, is there some interface I can implement and supply to the browser in order to achieve the above? As I said, I'd like to avoid writing my own HTTP server or Asynchronous Pluggable Protocol handler.
Thanks in advance
Simon
modified on Friday, January 30, 2009 10:56 AM (typo)
|
|
|
|
|
Well, in case anyone stumbles across this post, I thought I'd let you know how I solved my problem (well, this one anyway)...
Turns out a pluggable protocol is the solution. The basics are easy to write and, critically, they can be registered on a per-process basis.
I invented my own URL scheme, implemented an APP for it, registered my APP class factory using CoInternetGetSession and IInternetSession::RegisterNameSpace and away I went.
The UI is now "served" via my own URL scheme by my own APP on a per-process basis.
|
|
|
|
|
Hi,
I am trying to access a aspx page controls from a COM component, in particular I need to know the position of different controls on the web page so that I can, for example, click on a button or enter text in an editbox...
So far I have found that it can be done from .NET framework as explained in http://msdn.microsoft.com/en-us/library/ms178509.aspx[^]
Now I would like to know how the same can be done in COM.
Any help would be greatly appriciated.
Thanks in advance!
|
|
|
|
|
Hello I´m new in developes Controls with VC++ (VS2005)
When I use a activex, creating in desinger mode, the message OnLButtonUp (WM_LBUTTONUP) define in Warpper class return very well, but when I Create the activex in runtime mode, it don´t work.
What is my error ? I mistake some code ?
Parts of my code to better explain ..
class CTest2001Dlg : public CDialog
{
public:
CListView2 LV1;
CListView2 *pLV3;
afx_msg void OnBnClickedButton1();
};
void CTest2001Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_LISTVIEWCTRL1, LV1);
}
void CTest2001Dlg::OnBnClickedButton1()
{
CRect cPosition(300, 100, 400, 200);
pLV3 = new CListView2();
pLV3->Create(_T("{BDD1F04B-858B-11D1-B16A-00C0F0283628}"),NULL, WS_TABSTOP | WS_VISIBLE,cPosition,this,IDC_LISTVIEWCTRL_3,NULL);
}
#pragma once
class CListView2 : public CWnd
{
DECLARE_MESSAGE_MAP()
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
};
#include "stdafx.h"
#include "CListView2.h"
IMPLEMENT_DYNCREATE(CListView2, CWnd)
BEGIN_MESSAGE_MAP(CListView2, CWnd)
ON_WM_LBUTTONUP()
END_MESSAGE_MAP()
void CListView2::OnLButtonUp(UINT nFlags, CPoint point)
{
AfxMessageBox (_T("Clicked in CListView2::OnLButtonUp " ) , MB_OK|MB_ICONSTOP);
CWnd::OnLButtonUp(nFlags, point);
}
thank´s
|
|
|
|
|
hi,
if you are trying to create an ActiveX control at runtime , be sure that you are calling the
AfxEnableControlContainer() of method. and CoInitialize() also.
call these functions in OnInitIntstance()/CWinApp
hope this works!
^-^
@|@
- redCat
|
|
|
|
|
Hi, thank's so much, but i'm using :
InitCommonControls();
AfxEnableControlContainer();
CoInitialize(NULL);
on MyApp.InitInstance();
A think my problem is beacause a Runtime Acitivex don´t have a :
DDX_Control(pDX, IDC_LISTVIEWCTRL1, LV1);
On
:DoDataExchange(CDataExchange* pDX);
Somebody have anything idea ?
One more Thank You.
|
|
|
|
|
Here goes my problem :
I have a IStream interface pointer created using SHCreateStreamOnFile() for a text file..
When I try to write into the stream using IStream::Write() function, the function returns with a success code S_OK. But the issue is that when look back to the file, I see the file empty..
Please help !!!!!
|
|
|
|
|
Are you sure IStream can be used to write to a text file? I've always used it for writing to a structured storage file. If I'm wrong and it will write to a text file, have you opened the stream in transacted mode and so have to call ISteam->Commit to make any IStream->Write calls be seen in the ouput file?
|
|
|
|
|
Hi,
I am a newbie to the COM and Microsoft technologies. i have a COM dll to be used in my C++ program to connect to remote server and handle events recieved from the remote server.
COM dll contains the single interface and following functions are available
setIpAddr()
setPort()
Connect()
startRequest()
Also available events are
onConnect() :- occurs when the server responds to to Connect() call above
onRecieveData() :- occurs when the call startRequest() is made and this is continuous event happens when ever the remote server sends the message.
I am able to create the COM object and call the methods. my question is, how take care of the event handlers.(creating stubs for the events above).
Here is the code snippet
#include "stdafx.h"
#using <mscorlib.dll>
#import "XYZCom.dll"
#include <string>
using namespace System;
int main(){
XYZCom::ITXYZCom *interfaceXYZ = NULL;
HRESULT hr;
CoInitialize(NULL);
hr = CoCreateInstance ( __uuidof(XYZCom::ITXYZCom), NULL, CLSCTX_INPROC_SERVER, __uuidof(XYZCom::ITXYZCom), ( void** ) &interfaceXYZ );
if( ! SUCCEEDED( hr ) )
{
interfaceSinal = NULL;
printf( "Unable to create instance of the object.\n" );
// goto _EndMain;
}
interfaceXYZ->setIpAddr("127.0.0.1")
interfaceXYZ->setPort("15000")
interfaceXYZ->Connect();
Google talks about ATL i am not sure about it. How to implement the event handlers for the event interfaces defined in the COM DLL
|
|
|
|
|
|
How To pass structure or complex data in IDispatch using invoke() method.
The COM server component is third party's so I donot have control on what defined in IDL or whatever technology they used. for example I want to pass complex data or structure like below to invoke() method.
struct tag{
int i[10];
char str[40];
}sample;
Below is sample code to access method passing argument.
// Code omitted for brevity.
szMember = “On”;
dispparams.rgvarg[0].vt = VT_BOOL;
dispparams.rgvarg[0].bool = FALSE;
dispparams.rgdispidNamedArgs = &mydispid;
dispparams.cArgs = 1;
dispparams.cNamedArgs = 1;
hresult = GetIDsOfNames(IID_NULL, &szMember, 1,
LOCALE_USER_DEFAULT, &dispid);
hresult = pdisp->Invoke(
dispid,
IID_NULL,
LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYPUT,
&dispparams, NULL, NULL, NULL);
I need to pass one argument in IDispatch's Invoke method as below . This is sample code from c# client. I already have client C# code working. I want to pass structure which has byte array and string etc in c++ using IDispatch. How usually people pass structure as single argument in IDispatch's Invoke method()
public class BLOB {
/// <remarks/>
public string contentType;
public System.Byte[] binaryData;
public string ID;
public string URL;
}
OR
If above is complex is anyone know how to pass structure like below in IDispatch's Invoke() method. The COM Server is third party.
struct tag{
char str[100];
void *p;
char str1[300];
}
modified on Tuesday, January 20, 2009 2:23 AM
|
|
|
|
|
How usually people pass structure as single argument in IDispatch's Invoke method?
Personally I'd go for a VARIANT containing a SAFEARRARRAY which in turn contained the structure.
Though your structure doesn't look to COM friendly, especially the void pointer. Have a look at this http://www.microsoft.com/msj/0696/activex0696.aspx[^]
|
|
|
|
|
Hi,
Can you please provide the method signature that you want to access?
you cannot send the structure just like that to a method in COM.
Only you can pass the arguments that are agreed in the IDL of the COM server.
you can find the signature using the OLE VIEWER.
^-^
@|@
- redCat
|
|
|
|
|
Hi,
I have a COM component written in .Net and hosted in a COM+ server application so that only 1 instance of the component will exist on a box at a given time. Multiple different applications will be accessing the COM component: Matlab, VB Script, .Net application, etc...
When the COM component is instantiated from VB Script or Matlab, I can see the COM+ server starting properly and can verify that only 1 instance of my object is created.
My problem arises when the COM component consumer is a .Net application. Basically, it seems .Net always resolves the location of the DLL and since it is a .Net DLL, always instantiate the object directly, skipping the COM+ mechanism. It seems obvious why .Net behaves that way to get rid of COM overhead, but this is causing problems in my design since I want only 1 instance of my COM Component to exist on a box at one time.
So the question is how can I instantiate a .Net based COM component hosted in a COM+ server application from a .Net application by using the COM+ mechanism?
Thanks
|
|
|
|
|
I have written a custom tool.
It generates a dll that I then have to manually register with gacutil, regasm, and add a key to the registry.
I'd like to be able to distribute this with a setup project.
Unfortunately I can't seem to get a setup project created to install this.
Has anyone here done this before? Or know of an article explaining how to do it?
Thanks,
-C
|
|
|
|
|
I am a newby to COM (ActiveX) Programming and i have a problem regarding a activex control created with the MFC Wizard.
This activex control is derived from a static control and is used to draw diagramms. The drawing of the diagrams itself is working fine. The control evaluates some mouse events (LButtonDown, LButtonUp, MouseMove) to draw extra lines or rectangles to the control.
When using the activex control in the ActiveX Testcontainer the drawing regarding to mouse events is working fine, but if i include the activex control to a dialog based application the control does not respond to any mouse event when clicking or moving the mouse over the control.
How can i setup the activex control in the dialog so that it responds to mouse events or is the problem part of the activex control itself.
Thanks in advance
|
|
|
|
|
override PreTranslateMessage in the dialog, and provide these messages to your ActiveX.
Greetings from Germany
|
|
|
|
|
I tried it but it is still not working
Best regards
|
|
|
|
|
Try to set the Control Parent property of the Dialog to true.
«_Superman_»
|
|
|
|
|
Hi all,
Is anyone aware of why some of the events in PowerPoint do not fire.
The WindowBeforeRightClick in particular is the one I wish to trap so that I can prevent the right click menu from appearing.
I'm using Office 2000.
Thanks
Cheers
Tom
Philosophy: The art of never getting beyond the concept of life.
Religion: Morality taking credit for the work of luck.
|
|
|
|