|
Hi - I'm working on a similar problem with a crash after the wizard, but I did get the wizard to display. You need to use the AddPages method of IPublishingWizard (inherited from IWizardExtenstion) to fill an array of HPROPSHEETPAGE's, create a PropertySheetHeader with these pages, and call PropertySheet() to display. Let me know if this works for you.
hr = pIPublish->Initialize(pDataObject,SHPWHF_NOFILESELECTOR, L"InternetPhotoPrinting");
if SUCCEEDED(hr)
{
DWORD dwNumPagesAdded = 0;
HPROPSHEETPAGE hPropSheets[9]
hr = pIPublish->AddPages(&hPropSheets[0], 9, &dwNumPagesAdded);
if SUCCEEDED(hr)
{
psh.phpage = hPropSheets;
psh.nPages = dwNumPagesAdded;
psh.nStartPage = 0;
psh.dwFlags = PSH_WIZARD;
psh.hwndParent = NULL;
psh.hInstance = NULL;
PropertySheet(&psh);
}
}
Thanks,
-Denise
|
|
|
|
|
Hello, Denise!
Thank you for help. I tried your advice, but the window with Wizard did not appear, though PropertySheet returned normal result (-1). Do you have any ideas?
Thanks, Sergey.
|
|
|
|
|
i am new to COM programming so i was wondering if any proffesional COM programmers can help me here... i work for a game company and i need to implement a remote debugger for our Script Engine which is a LUA script engine. some one suggested me to use COM servers and clients for this. I dont have much knowledge of COM right now and im studying it right now. With the amount of knowledge i have i can imagine for this project i need to have a COM server which can provide two types of object model.. one debugger and one debugee... and then clients have to use these interfaces to send and recieve info... like for example for a BREAK command the script editor uses the debugger interface to send data to the debugee saying that i need to break at this line when ever ya reach and blah blah.. in exchange the application would use debuggee interface to call debugger to say that we have reached this line and stuff... does this architecture seem aright? i mean using COM...?? and then one more important thing is that there could be any number of interfaces alive out there.... is there anyway in COM to find how many debugee interfaces are running and then access them???!!! any suggestion and help is much appreciated.... thanks
|
|
|
|
|
Perhaps more information on the nuts and bolts of how one actually *writes* this software may be helpful.. I have a step-by-step DCOM tutorial, where I build a simple server which says "Hello, world!" back to the client, may help put some of this in practical perspective...
The tutorials are written as a series of separate articles, called Steps, which cover the major breakpoints in the development of the system.
Step 1 of the tutorial for VC 6 is at
http://www.codeproject.com/com/HelloTutorial1.asp[^]
And Step 1 of the turtorial for Visual C++.NET 2003 is at
http://www.codeproject.com/useritems/HelloTutorial1NET.asp[^]
I tried to write the tutorials in Microsoft-ese, so you can follow along as if you were reading the Scribble tutorial. The VS.NET version is still a work in progress; that's why it's still in "Unedited User Constributions."
Not all the Steps have been written for the VS.NET version yet. But I am working on it!
Stay tuned!
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
|
I want to masking the word's SaveAs function,and the EditCopt EditPaste function.First,I build a ATL project, then input the needed library.I want to reload the SaveAs funcion,and EditCpopt EditPaste function,but I Don't know
how to write the above 3 function.
If anyone know how to do this,please tell me!
Thank you very much!
|
|
|
|
|
I want to Modify Microsoft Exchange database. Is there any component available for that purpose?
Tauheed
|
|
|
|
|
Hi all,
I wrote a server(VC++) having 2 COM object(A,B) & I want client application only can create COM object A and can not create COM object B. COM object B will be return by calling a function exported in an interface of COM object A.
For example, client application written by VB
Dim a = new A
Dim b as B
call a.getInstanceB(b)
call b.doSomething
Any body know what to do to make COM object B can not be created by client application?
Thanks a lot,
Tin Le,
|
|
|
|
|
As I've been curious about the same thing, I took this as an exercise, and
if you use ATL for your COM server, I have the solution for you.
ATL includes an object map in its implementation file that includes entries for each class the server implements. The map is located in the COM servers implementation file (named <project name="">.cpp) and looks like this
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Creatable, CCreatable)
OBJECT_ENTRY(CLSID_IsNotCreatable, CIsNotCreatable)
END_OBJECT_MAP()
Change the object entry to OBJECT_ENTRY_NON_CREATEABLE of your non, creatable class.
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Creatable, CCreatable)
OBJECT_ENTRY_NON_CREATEABLE(CIsNotCreatable)
END_OBJECT_MAP()
After this, the CIsNotCreatable coclass cannot be created by CoCreateInstance. (Take a look at the documentation of OBJECT_ENTRY_NON_CREATEABLE in MSDN).
To let the creatable class create an instance of the non creatable and return a COM pointer ot it, you can do like this
STDMETHODIMP CCreatable::CreateNotCreatableObject(IIsNotCreatable **obj)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
HRESULT hr;
CComObject<CIsNotCreatable>* instanceOfNotCreatableClass;
hr = CComObject<CIsNotCreatable>::CreateInstance(&instanceOfNotCreatableClass);
if (SUCCEEDED (hr)) {
instanceOfNotCreatableClass->AddRef ();
*obj = instanceOfNotCreatableClass;
}
return hr;
}
|
|
|
|
|
|
Hi all,
I have a C++ DLL that I "think" I need to make COM aware to make it work on both 32 and 64 bit windows processors. According to Microsoft site:
"On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers). On 64-bit Windows, an out-of-process 32-bit COM server can communicate with a 64-bit client, and an out-of-process 64-bit COM server can communicate with a 32-bit client. Therefore, if you have a 32-bit DLL that is not COM-aware, you can wrap it in an out-of-process COM server and use COM to marshal calls to and from a 64-bit process." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/process_interoperability.asp)"
Unfortunately, I don't have a whole lot of COM experience. Can anyone point me at some resource to help me out with this project? Anyone with good/bad experience doing this type of wrapper? Any suggestion, or help would be greatly appreciated.
Thank you in advance,
James
|
|
|
|
|
Go to the COM and/or ATL section of code project. There are plenty of tutorials there.
I've not done a wrapper for this explicit reason, but I've wrapped other DLLs before and its no big problem.
The simplest way is to use the ATL Appwizard assuming you're using VC++.
Kev
|
|
|
|
|
When I create multiple out-of-process COM instances of same class from a com server, is it then, in some way, possible to let them run in different processes?
-- modified at 4:29 Tuesday 13th December, 2005
|
|
|
|
|
I have writen a COM Exe.
I an create the object and call it all day from VB. If I create the object in a C++ application using #import symanctics. Calling application hangs and eventually gets a runtime error that crashes msdev environment. What is proper way to create a com exe object through C++ that will mimic the behavior of createobject in vb.
a programmer traped in a thugs body
|
|
|
|
|
Hi
I have searched a lot for this, but in vain. I found sites were the same problem has been raised, but nowhere with a proper answer. I hope I will get an answer here.
I am using an ATL COM server in VC++ from C#. Object of a class from the COM side is successfully created at C# side. But while calling a method on that object it is throwing an error with message "The Server threw an exception". The Error encountered is 0X80010105. And the HRESULT is -2147417851.
Everything was working fine until I made some changes at the client side. I don't think those changes have some relation in with this error.
Code for the Server and client side are as shown below
//Client side in C#
ServerObj sObj = new ServerObj();
//Error is thrown here, arguments passed are interger, reference of structure and object of calling class.
sObj.CallServerMethod(integer, ref structure, this);
//Server side in VC++
STDMETHODIMP CServerObj ::CallServerMethod(int integer, tagStruct *pVal, VARIANT vt)
{
}
Thanks in Advance,
Diana.
|
|
|
|
|
Hi
I would like to add a new observation with the above mail.
The problem is seen only in the Debug Mode. The first line in the that method ("assert(false);"), which enables debugging was commented out and its not throwing any more Exception and working fine.
//Server side in VC++
STDMETHODIMP CServerObj ::CallServerMethod(int integer, tagStruct *pVal, VARIANT vt)
{
//assert(false);
}
But I don't know why it was happening.
Regards,
Diana.
|
|
|
|
|
Hi
I am writing a WMI application to monitor the file system events in my system.i had converted the query given in http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0404.mspx" into a WQL in c++. But i am getting an error message Query execution failed. Can anyone help me in this regard.
Is it possible to monitor the entire system for file system changes using WMI ?
|
|
|
|
|
Hi there. I've placed a shockwave flash object on a vc++ dialog and I want to completely eliminate the popup menu which appears under the mouse right click but the flash ocx doesn't have any method to handle the mouse clicks and the menu always pops up. Anyone got any idea?
... And nothing else matters!
|
|
|
|
|
I'm having serious problems trying to insert data into a ms access database. everytime i submit the data, they don't get inserted into my ms access table. I think I don't have permission to insert data into the ms access table, but I don't know how to change the settings so that I can just simple insert data into my table. Any help as to the step-by-step procedure to solve my problem will be received with great thanks
here's the code. the actual form part is from another asp page. This page does the actual inserting of data into table:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Forum"
set rs=Server.CreateObject("ADODB.recordset")
%>
<%
sql="INSERT INTO forum1 (PosterName,Date,Comments,"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("name") & "',"
sql=sql & "('" & Request.Form("date") & "',"
sql=sql & "'" & Request.Form("comment") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("" & recaffected & " record added")
end if
conn.close
%>
jibybabu
|
|
|
|
|
Can Anybody help me in solving this COM problem
I have Created a .Net Windows application in C#.
This application has only a WebBrowser Control. On the Form load event I have navigated to a particular site. (Say www.google.com).
Now I have an Another application that is intended to send keys to this Application.
I’m Using SendKeys.Send () fn. for this.
To my Surprise the webBrowser control is not receiving any of the keystrokes, however the TAB key is working in it.
Then I Opened a normal InternetExplorer page and tried the same. Then that application is receiving keystrokes. I want to know why the webBrowser control (C# application) is not receiving keystrokes.
I will be very grateful to you if u help me in this problem.
Thank you,
Arun Appukuttan
THANK YOU
|
|
|
|
|
try sendkeywait() method..
just a guess..
Good LUck
|
|
|
|
|
Dear Sufyan_shani
using SendKeys.SendWait() fn will not solve the problem. This Problem became a great overhead to me. If any body can help me in this regard i will be very thankfull.
Thank You in advance
Arun Appukuttan
THANK YOU
|
|
|
|
|
Hi,
I made a com component in C# but I don't know how to call it from a VC++ environment(the steps to register it ,etc..)
Thanks
emmy
|
|
|
|
|
Hello meesho,
Just like a normal COM DLL or EXE, a .NET module which has been wrapped as a COM module needs to have its information written into the registry in order for the COM sub-system to locate it and load it into memory for a client.
REGASM.EXE
----------
This is achieved via the REGASM.EXE utility. REGASM performs similarly to the well-known REGSVR32.EXE utility which is used to register COM modules. REGASM uses the metadata contained inside a .NET assembly to generate COM-equivalent information which are then used to insert entries into the registry.
The entries written into the registry include the CLSIDs and ProgIDs of .NET classes which are exposed as COM classes. This registration process is important for COM clients in the discovery and loading process.
Call the REGASM.EXE utility inside the Visual Studio .NET command prompt as folows :
regasm <.NET DLL Assembly Name> /tlb
The "/tlb" flag commands REGASM.EXE to produce a Type Library File (.TLB) for the .NET Assembly. It is useful for your VC++ client to import.
In your VC++ code, you import the .TLB file using the #import keyword, e.g. :
#import "(TLB file path)";
GACUTIL.EXE
-----------
Next, for ease of discovery and loading by the .NET CLR engine, your .NET DLL Assembly -should- be registered into the GAC (Global Assembly Cache). This is not 100% required but will make life must easiler for your client apps.
In order that a .NET module be registered to the GAC, it needs to be digitally signed. This requires a Strong Name Key (SNK) file. You can create an SNK file using the "sn.exe" .NET utility.
Another step to take is to set the path of the SNK file in the AssemblyKeyFile attribute in the AssemblyInfo.cs file :
[assembly: AssemblyKeyFile("..\\..\\KeyFile.snk")]
To register an assembly into the GAC, we use the GACUTIL.EXE utility. For example :
gacutil -i <.NET DLL Assembly Name>
An alternative to using GACUTIL.EXE is to copy your DLL Assembly into a folder location that can be discovered by the .NET CLR.
Give it all a try, meesho. Let me know if you need further clarifications.
Best Regards,
Bio.
-- modified at 2:24 Friday 9th December, 2005
|
|
|
|
|
i have a question regarding article
Component-Based Development with Visual C#
By Wiley Technology Publishing
http://www.codeproject.com/books/0764549146_8.asp
now i want to have drag and drop support with web browser control, plz guide me which interfaces should i implement.
i have xml data in treeview control, now i want to design my own html page with xml data , how do i drag and drop xml element on web browser control
plz help me
fahad
|
|
|
|
|
Can any one tell me the good e-book or any book for learning ActiveX Programming with the combination of VB or C++.this should be usefull for begining level and also programable.
N.Rajakumar B.E.,
Application Developer,
|
|
|
|