|
My Question is, I have a one dll in that dll contains so many classes, then now I want to export a call and then Import a call.
can you tell me thorugh the example.(How I can export and How I can Import).
Srinu
|
|
|
|
|
It depends on what you want to export and in some cases the the compiler used to do the exporting and the importing. If you just want to export a global function you need to look up extern "C" and __declspec(export) or use a .DEF file. With this technique the compliers used at the exporting and importing ends will not matter. If you want to export a class use __declspec(export) on the class. Using this technique the compilers at each side must use the same name mangling scheme. Or else you can use COM to export a COM object and the importer can be any langauge that supports COM. More information is needed before any more detailed help can be given.
Steve
|
|
|
|
|
|
|
i want to ebook of inside com and if anybody have CHM file then please send or send me a link to download CHM file.
Bankey Khandelwal
Software Engineer
Solversa TechnologiesPvt.Ltd.
15,Yeshwant Nagar
Range Hill Road
Ganeshkhind,Pune-03
bankey.khandelwal@solversa.com
Mobile: +91-9850432990
Office : +91-20-25521888
|
|
|
|
|
I am new to COM and would like to get some information.
I need to create an active document server application.
I have some questions and I would be grateful if you can answer the following
1) Can I create a dll that is an active document server(either mini or full server)? if no, please specify why?
2) What do I need to need to get started with active documents and have complete understanding of what I am doing.
3) Can you point to some online resource which gives indepth implementation details about active documennts. All the links I found in google asked me to create first a skeleton application using wizard which I would to avoid so that I have complete know how of my code.
4) this question might seem stupid but its important for me. Is there any use of active documents other than that your application will not open in a separate window and will be activated inplace.
Thank you
|
|
|
|
|
Hi everyone,
I hope someone has idea on how to do this...
I used this example[^] to create a user control with windows controls with the idea of accessing the client's file system through internet explorer by using this interface as an ActiveX.
The basic idea is that through this control I access some files in a server through FTP that need to be updated, for example in c:\files\ in the client that's looking at this web page.
So, I navigate in IE to this webpage with this user control in the page, and it works ok in my working computer, but when I try to run this update in another computer, I get error messages stating that I don't have the priviledges to access the files in the computer.
Has anyone by any chance tried something like this? accessing the client's file system from IE using a user control?
My studies have brought me to the fact that it's possible to update these files:
- By setting this web site as secure in IE it works ok in other computers.
- By setting security priviledges with the .NET Framework configuration tool the control also works.
Well, what I need is that some how the user doesn't need to do any of these configurations, but somehow the user is asked if it allows the activex component to run and lets it work on his computer.
I've seen that some activex controls prompt if they'll be allowed to run, but for some reason this is not the case with this control.
Thanks for taking the time to read this
daniero
-- modified at 19:32 Wednesday 18th January, 2006
|
|
|
|
|
I am currently following a book on how to sign assemblies with strong names in order to register a serviced component in the into the COM+ catalog and some errors are occuring.
My AssemblyInfo.cs file currently looks like this: (of importance is the AssemblyKeyFile attriubte)
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.EnterpriseServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("StepByStep7_1")]
[assembly: AssemblyDescription("Retrieve and update data from the Northwind database")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StepByStep7_1")]
[assembly: AssemblyCopyright("Copyright © 2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ApplicationActivation(ActivationOption.Library)]
[assembly: ApplicationName("NorthwindCS")]
[assembly: AssemblyKeyFile(@"..\..\..\70320.snk")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2d37557e-b619-4092-80e4-4a30e2978021")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
When I build the application I get the following error:
Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'
Can anyone help explain why this error is coming up? The build itself actually does succeed, however it is giving me hassle when I come to register the serviced component in the COM+ catalog. I am presuming that it is because of the error in the build?
I would be very grateful to anyone who can help in order that I may move on in the book as I have just got a second wind to return to my studies and want to make the most of it while it lasts!!!
Thanks
Paul
|
|
|
|
|
I've an ActiveX visible control, written in ATL. Different containers can run it.
Besides, I've a COM (MFC EXE) Server that being informed about any ActiveX properties changes. So I'd like to change the same properties in the other running ActiveX components. In other words all of ActiveX'es could change their properties synchronously.
Thanks.
|
|
|
|
|
Hi,
I have 3 dlls, one is COM DLL and two are c++ dll.
I want to debug the c++ dlls from the com dll through the vb client.
Here the secnario is c++ dll are talking to the mainframe, but when we try to execute the asp client first com dll get activated, from that com dll c++ dlls are gets called.
Pls help me.
Srinu.
-- modified at 9:30 Friday 20th January, 2006
|
|
|
|
|
Now, There is a WebBrowser Control in my application, I hope get the http header by someone Interface.The http header such as
200 ok http/1.1
.
.
type:
set-cookie: !@#$%^&*(
content-length:@#$
..
|
|
|
|
|
The DISPID_BEFORENAVIGATE2 notification has a Headers parameter that looks like it might do what you want.
Steve
|
|
|
|
|
To Stephen Hewitt:
Thanks,but the DISPID_BEFORENAVIGATE2 can only get request http header,not get response http header.
|
|
|
|
|
Hi,
I try to use a Dragonfly ActiveX - XY-Plotter in Matlab SP3.
You will find the Dragonfly ActiveX Library here: http://www.dragonflydas.com/
It's possible to set the properties of the object like colour, grid etc.
I have the problem to plot the data, because I have to call the function PlotXYData of the object with datatype Variant.
I use cell arrays or struct arrays to plot the data, but it didn't work.
I only get the bool value false back.
May you help me, how I should handle functions with datatype Variant in Matlab?
Best Regards
Tolpan
The Matlabcode:
dfpos = get(0,'DefaultFigurePosition');
hfig = figure('Position', dfpos,'Menu', 'none','Name', 'ActX-Test');
hXYChart = actxcontrol('Scope.XYChart.1',[0 0 0 0],hfig);
posfig = get(hfig,'Position'); % Clientfläche des Parent-Windows
sizeactx = [0 0 1 1].*posfig([3 4 3 4]); % Berechnung der ActX-Element-Fläche
move(hXYChart, sizeactx);
hXYChart.invoke('ResetAll'); % Eventuelle Voreinstellungen zurücksetzen
hXYChart.set('bkColor', 140000); % Farbeinstellungen
hXYChart.set('PlotBackgroundColor', 60000);
hXYCurveProp = actxserver('Scope.XYCurveProp.1');
hXYCurveProp.set('Name', 'Curve1');
hXYCurveProp.set('Key', 'Curve1');
hXYCurveProp.set('Unit', 'm');
hXYCurveProp.set('UnitFactor', 1);
hXYCurveProp.set('Max', 100);
hXYCurveProp.set('Min', 0);
hXYCurveProp.set('Color', 0);
hXYCurveProp.set('Width', 1);
hXYCurveProp.set('LineStyle', 0);
hXYCurveProp.set('CurveStyle', 0);
hXYCurveProp.set('PointSize', 6);
hXYCurveProp.set('PointStyle', 2);
% Kurve zum XYChart hinzufügen:
hXYChart.invoke('AddCurve', hXYCurveProp)
% Zeilenvektoren erzeugen:
x = [0 10 20 30 40 50 60 70 80 90 100];
y = [0 10 20 30 40 50 60 70 80 90 100];
xv=num2cell(x);
yv=num2cell(y);
size=length(x);
a=hXYChart.invoke('PlotXYData', 'Curve1', size, xv,yv)
The methods of the object are:
AddCurve = bool AddCurve(handle, handle)
GetCurveProperties = [bool, handle] GetCurveProperties(handle, string)
PlotXYData = bool PlotXYData(handle, string, int32, Variant, Variant)
RemoveCurve = bool RemoveCurve(handle, string)
ResetAll = void ResetAll(handle)
ResetCurve = void ResetCurve(handle, string)
SetAreaCurveTop = void SetAreaCurveTop(handle, string)
SetCurveProp = bool SetCurveProp(handle, string, handle)
hWnd = int32 hWnd(handle)
|
|
|
|
|
I am using the following code to test the speech api,
using SpeechLib;
using System.Security ;
[SuppressUnmanagedCodeSecurityAttribute()]
private void Button1_Click(object sender, System.EventArgs e)
{
try
{
SpVoice voice = new SpVoice();
voice.Speak("Hello",SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault);
}
catch(Exception ex)
{
Response.Write(ex.ToString()) ;
}
}
I have added a reference to Microsoft Speech API through Add Reference tab-Com Componentes, i have also added the aspcompat=true @Page attribute
But it is giving the error:
System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x8004503A
Please help me to get the code to Speak.
Thanks in advance
This is naresh
|
|
|
|
|
I want to learn COM ,
am a naive to COM .
pls send me some links or simple examples
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
|
thank you
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
Hi,
hm... how to start ... I work with MSVS VC++ .NET 2003 (Windows XP SP2)
I created simple MFC DLL with automation (should work in-proccess) and added
a interface to it (based on CCmdTarget class). Everything compilation and
registration succeeds.
In my application which will be using DLL, when I do:
#import "path_to_DLL_file"
use namespace LibTest;
LibTest::ITrackerPtr ptrTrack;
HRESULT hr = CoInitialize( NULL );
hr = ptrTrack.CreateInstance( "LibTest.Tracker" );
CreateInstance returns REGDB_E_CLASSNOTREG error (CoCreateInstance returns
E_OUTOFMEMORY).
When I create similar project in MSVS VC++ 6.0 everything works fine and
problem with initiation DLL doesn't exist.
Anyone knows how to resolve this problem ? Maybe I forgot about something ?
Please help !
Mila
|
|
|
|
|
Hi. I have a problem, which I was trying to solve since a lot of hours and reading docs in the web.
The situation is:
I created an inproc-dll using the ATL-COM Wizard in VC++6. I added an ATL-class using "new atl-object". I added one property for testing purposes. I created the dll and tested it in VB6. It worked. I could create an object in VB6, set the property and read the property.
But:
If I create two objects in VB6 (using SET ... = NEW ...) and set the property in one of them, the property has the same value in the other object. So internally there is only one object with two references.
Or:
If I create an object in VB6 (using SET ... = NEW ... again), set the value and set the object to NOTHING, and then create it by new, the property still has the value.
It seems, that there is only one object in the dll, and it will not be terminated, it lives on and keeps all values ...
(As a workaround I created the same project in the same way, only as an ActiveX-EXE, set the "hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
REGCLS_SINGLEUSE)", and now I can have multiple object with separated properites and lifes and so on. But each object creates a new task in the system, and it is not an inproc-solution.
My Question is:
How can I easily change my inproc-solution, so that I can have multiple instances with separated properties and InitInstance and Terminate and so on?
Or does anyone have any sample for me?
Lots of thanks in advance ...
Heiko from GPSoverIP
|
|
|
|
|
Allowing multiple instances is normal for ATL generated COM objects. Check your source for the following macro:
DECLARE_CLASSFACTORY_SINGLETON
If this is present in an object then the object will behave as you describe.
Steve
|
|
|
|
|
Hi,
I am working on a project which involves drag and drop of data between a namespace extension and windows explorer. In this, when a file is dragged from my namespace extension and dropped on explorer I need to know on which folder the file was dropped.
Can someone please help me with this?
Thanks and Regards,
Anil
|
|
|
|
|
Hi,
I have an application in which my application uses COM of some other interfacing application. Because of this interdependency i need to recompile my COM components whenever there is any chnage in the interfacing COM Components. Is there any way to resolve the inter dependency issue. Can i use MIDL (Microsoft Interface Definition Language) to resolve this issue or can i use DCOM.
regards
Sumit
|
|
|
|
|
Can you describe this "interdependency"?
Steve
|
|
|
|
|
Hi Have an application which have COM (compatibility set to Project Compatibility). These COm have interfaces with other COM of different application. When ever there is any change (new function added or deleted, any modification) happens in interface COM i need to recopile again my COM using these new Changed COM of interfacing application.
Is there any way to sort this out. Can i use interface file(IDL) so that if in any case if there is any chnage in interface COM i need to chnage just the interface file not to recopile my COM
Regards
Sumit
|
|
|
|
|