|
The DLL to be redirected to must be placed in the same folder as the application, and the file must be in the same folder and named appname.exe.local. For example, notepad.exe.local to redirect Notepad.
|
|
|
|
|
Hope to use C# for ActiveX in Excel VBA. Success to call as COM, but fail to add the control from "Control Toolbox" as ActiveX
I want to use C# for ActiveX in Excel, but fail to add the control from "Control Toolbox".
I have write a COM object using C#, and I can call those function in Excel VBA normally.
But when I try to change it as a ActiveX, I fail.
The Excel can detect my COM object as a ActiveX, that means it can show in the "Control Toolbox".
Once I select it, and try to put it in the Excel, it show me a dialog box said "Cannot insert object".
I have read the following link about the error message, but for my ActiveX in C# do not have the .odl file.
http://support.microsoft.com/default.aspx/kb/171280/
Can any one give me some hints?
|
|
|
|
|
HI again-
another newbie query:
Having got a Gridview bound to a dataset (which is the returned value of a method), and having all the fields displayed by field-name without any code, i thought i could do the same with Formview: bind it to a dataset and have form-controls generated for each field.
But it didn't happen, i could not get it to work; so i ended up binding my Formview to a method that returned a class: with code like
------------------------
myClass2.SpeciesId = _dsSpecies.Tables(0).Rows(0).Item("spID").ToString
myClass2.CommonName = _dsSpecies.Tables(0).Rows(0).Item("common").ToString
myClass2.LatinName = _dsSpecies.Tables(0).Rows(0).Item("latin").ToString
myClass2.LifeText = _dsSpecies.Tables(0).Rows(0).Item("lifecode").ToString
--------------------
to get at each field of the dataset.
Which is rather like the code I had "in the old days", but having discovered the data-adapter and "fill" and getting my Gridview bound to the dataset, i thought i had got away from such coding?
Can anyone tell me if it is possible to bind a Formview to a Dataset, so that the Formview controls can be generated (or selected) from that dataset, or do i need to leave my code as above? There must be a way oif Gridview is so clever, but binding to a method that returned a dataset didn't go anywhere
thanks -
aitch
--x---
|
|
|
|
|
Maybe the VB.NET one is more appropriate.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: Maybe the VB.NET one is more appropriate.
is it, i'm sorry: but as there is far more about the Formview Control in my asp.net books than in my vb.net books, and the asp.net books go into it in much more detail, i thought this was a more appropraitw forum.
Unfortunetaly, neither the asp.net nor the vb.net books gives me any indication if i can bind a formview to a dataset.
|
|
|
|
|
HI,
How to fine the different DLL's, like which one is COM Dll, ordinary Dll or some other dll.
Nandu
|
|
|
|
|
Use Dependency Walker[^]
to load the DLL.
If the DLL has following exported functions (ideally) -
1. DllRegisterServer
2. DllUnregisterServer
3. DllCanUnloadNow
4. DllGetClassObject
then you can call it a COM DLL.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hi everyone... i hope im in the right forum
my question is about whether COM can handle disconnection...
say example I created the server remotely... after sometime the machine hosting the COM server was disconnected (eg. network cable was unplugged) then immediately it was reconnected (cable was plugged in)... will COM encounter an error when i try to call a method from that COM server?
when that scenario occurs, do i need to recreate my COM server?
thanks for the help!
newbie
|
|
|
|
|
|
Maybe it is not a COM DLL.Registration of standard DLLs is not needed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Yup, check if this dll need to be registered or not ? Use dependency walker, to determine, whether DllregisterServer is one of exported functions.
Prasad
MS MVP - VC++
|
|
|
|
|
Hi,
I am trying to access microsoft project using Microsoft Project Object Modal 11.0 .... I have used this COMponent (MSProject) successfully using desktop application (C#.Net) .Now that i started using this COMponent in ASP.Net application it started behaving very strange ...
1: using add reference ,I added MSProject Component .
2: I Run the application ,tried creating new instance
MSProject msProj = new MSProject.ApplicationClass();
3: The exception is thrown stating ... "Server Execution Failed"
4: I noticed there was no entry for MSProject.dll in the bin folder, so i copied the dll to bin manually and re-add the reference .
5: For the first time the instance was created successfully and no error reported .
6: In my second attempt to create instance , the same exception was thrown .To my surprise , this time the installation was corrupted .I could'nt open the project file now .
7: Event viewer stated : "Server [some GUID] didnt register with DCom within the required timeout"
any solution to this problem ... ????
Madni
|
|
|
|
|
Hi-
Hope someone can help
A gridview on my page alternates between using a dataset and a dataview, and also has some auto-generated "Edit" and "Paging" controls.
These controls fail if the gridview is sourced on the dataview, so i want to make those fields either invisable or disabled whenever i go into dataview mode.
However, i cannot anywhere find a means of turning those auto-generated controls invisable/disabled: so when the gridview is sourced on a dataview, i can crash the page when i hit the edit/page controls.
Hope someone can help- other than telling me to re-query the database for the different view, which i am on the verge of doing, but i really do not want to
thanks -
aitch
--x--
(And it took me all day to trace the error and rebuild my project, but at least i laerned that - hey, i cannot edit a dataview )
|
|
|
|
|
i need an active x control which can be used for my web page. folder browser should disply file stracture in tree view
|
|
|
|
|
And people in Hell need ice water. You've got about as much of a chance of someone handing over their hard work to you for nothing.
|
|
|
|
|
Plus he cross posted it in 5 forums!
__________________
Bob is my homeboy.
|
|
|
|
|
Hi all,
Can anyone tell me how to add a filter by Class ID and relate it with IBaseFilter Interface. I mean I have the filter Class ID from the graphedit application not something like CLSID_FilterName.Can anyone help me with this?
Thank You.
With regards
Raja Bose
|
|
|
|
|
write the following code
IGraphBuilder* g_pGraphBuilder;
IBaseFilter *MyFilter;
HRESULT hr
hr=AddFilterByCLSID(g_pGraphBuilder,CLSID_VideoRenderer,NULL,&VideoRendrer);
where the function is
HRESULT AddFilterByCLSID(
IGraphBuilder *pGraph, // Pointer to the Filter Graph Manager.
const GUID& clsid, // CLSID of the filter to create.
LPCWSTR wszName, // A name for the filter.
IBaseFilter **ppF) // Receives a pointer to the filter.
{
if (!pGraph || ! ppF) return E_POINTER;
*ppF = 0;
IBaseFilter *pF = 0;
HRESULT hr = CoCreateInstance(clsid, 0, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, reinterpret_cast<void**>(&pF));
if (SUCCEEDED(hr))
{
hr = pGraph->AddFilter(pF, wszName);
if (SUCCEEDED(hr))
*ppF = pF;
else
pF->Release();
}
return hr;
}
RajeshGupta
|
|
|
|
|
Hi Rajesh,
Thank you very much for replying, As you said in the following case
IGraphBuilder* g_pGraphBuilder;
IBaseFilter *MyFilter;
HRESULT hr
hr=AddFilterByCLSID(g_pGraphBuilder,CLSID_VideoRenderer,NULL,&VideoRendrer);
CLSID_VideoRenderer this one is not known to me. The classid like 2345-2445-3245-543456 (for example CLSID_VideoRenderer = 2345-2445-3245-543456)which I got from DxFilterSpy.exe is known to me. So can you tell me how do I add this Classid in my application and relate it to my base class filter
Awaiting for your reply
Thank You
With regards
Raja Bose
|
|
|
|
|
CLSID_VideoRenderer defined in uuids.h header file in directx sdk
if you want to include any CLSID that is not in uuids.h
the see DirectShow FAQ in directshow helpfile
RajeshGupta
|
|
|
|
|
Hi guys,
Thanks for taking the time to read this post.
I've got an ActiveX control embedded in a web page:
<html><OBJECT id="myFoo" width="640" height="480"
style="position:absolute; left:100;top:100;"
CLASSID="CLSID:f1387dda-43c0-4406-99a1-c1e0eaf1b5c8"
codebase="http://blahblah/FooClientAxSetup.cab"
type="application/x-oleobject">
</object></html>
That cab file contains 3 files: My setup.MSI file, setup.exe, and my .inf file which should tell Internet Explorer to launch my setup.exe file. Here's the .inf file:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
Hook=runInstaller
[runInstaller]
run=%EXTRACT_DIR%\setup.exe
I launch the page in IE7. It prompts me to install. I say yes. Nothing happens. What am I doing wrong?
|
|
|
|
|
I'm trying to do something that might actually be a bit silly. I'm accessing what is essentially a windows form from an aspx page, to do some printing from the server side for me.
I have the following code:
public class axForm : System.Windows.Forms.Form
{
public AxDHTMLEDLib.AxDHTMLEdit axd;
public axForm()
{
Thread.CurrentThread.ApartmentState=ApartmentState.STA;
axd=new AxDHTMLEDLib.AxDHTMLEdit();
((System.ComponentModel.ISupportInitialize)(axd)).BeginInit();
this.Controls.Add(axd);
axd.Enabled = true;
axd.Name = "axd";
((System.ComponentModel.ISupportInitialize)(axd)).EndInit();
}
public void printDoc(string sHtml, bool bPrompt)
{
axd.DocumentHTML=sHtml;
object filename=@"c:\fileouttest.txt";
for(;axd.Busy!=false;)
{
System.Windows.Forms.Application.DoEvents();
}
axd.SaveDocument(ref filename);
object opt=null;
if (bPrompt)
opt="1";
axd.PrintDocument(ref opt);
}
}
Basically I create an instance of that class in my aspx code behind, then call printDoc with the HTML I want to print and an indicator as to whether or not I want to see the print dialog (I don't but the code I based this on had the boolean in there and I thought it might be useful for testing).
The problem is I'm getting a HRESULT error message and I don't know what to do about it. I'm guessing, since the error is fired just after the .endInit() line that it's something to do with how I'm setting the thing up in the first place, but I don't know enough about it to be able to debug it properly. The error is:
'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll - Additional information: Exception from HRESULT: 0x80040200.
Can anyone help me figure this out? It seems like I'm really close to getting it working. If I tone down the amount of debug information I want, it actually runs without giving any errors at all, and the line that saves the document to disk actually works regardless, so I'm a bit confused. Any help would be greatly appreciated.
|
|
|
|
|
Hi,
Can anyone let me know URL or book where I can find the depth of STA and MTA.
Thanks
Nandu
|
|
|
|
|
|
Hi,
Can any help me in understnding proxy/strub in COM. Is there any website where I can find more info about this?.
Nandu
|
|
|
|