|
hi to all,
i have created a com object with c# and my output project is *.dll,
now i nead to export it to .lib file, how to do this work?
so thanks
bye
|
|
|
|
|
Where can I find the exact steps required to do this? I don't want to trust a new dll to properly unregister COM classes registered by a previous version of that dll, so before calling DllRegister whatever, I want to make sure my registry is cleaned of all traces of a component.
|
|
|
|
|
Have a look at [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
the standard way is to call as admin "regsvr32 /u *dll"
But it depends on the implementation if it does every thing right.
Or install the dll on a fresh system and compare registry before and after. But it can also be, that the dll is writing something at runtime.
A proper COM Server uses the same CLSIDs while it is compatible and use others if there is no compatibility.
Greetings from Germany
|
|
|
|
|
hi,
i had to upgrade one of our fileupload COMponent written in VB6 which was used in classic asp to a .net component. im able to write up the component but only problem is when passing he request to the .net component it is passed as ASPTypeLibrary.Request but i want it as System.Web.HttpRequest... is there anyway i could achive it.
and also the previous upload component fails when files are larger than 1 mb in our production environment, and works well in our qa and development environments. the <httpruntime maxrequestlength="10000" executiontimeout="300"> settings are givent correctly . but it fails. any idea about this.??
im deaf to the word no
|
|
|
|
|
I'm trying to implement registration free COM from a 'developer as a user" point of view, i.e. I would like to skip the requirement that the COM server be registered on the developer's (my) machine in order to produce the manifest files. All the guides on registration free COM seem to require the COM server initially being registered.
Surely there are some tools and or API's that would allow the dynamic creation of a manifest file for this purpose. Anyone?
|
|
|
|
|
Can you elaborate on the following:
Brady Kelly wrote: be registered on the developer's (my) machine in order to produce the manifest file
What's the deal with "the manifest file"?
Steve
|
|
|
|
|
The manifest file stores the information that would normally come from the registry for a registered COM server, e.g. the type lib ID, CLSID, etc.
|
|
|
|
|
You read some fine manual of COM. The registration is necessary to get them work.
The CLSID got an entry in the registry so the COM-Client finds the dll and can instanciate COM-servers.
If you dont want this, you can dynamically load dlls and call their functions.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: You read some fine manual of COM.
Maybe you should also read some manuals[^]. Then you would know that from Windows XP onwards, registration-free COM is possible using application and assembly manifest files instead of registry entries to locate the codebase.
|
|
|
|
|
Brady Kelly wrote: Then you would know that from Windows XP onwards, registration-free COM is possible using application and assembly manifest files instead of registry entries to locate the codebase.
Registration-free COM was available even before, using file monikers.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I've been googling to find exactly what you're looking for.
check out the manifest tool: \Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe
sample usage to create a manifest from an rgs and tlb:-
mt.exe -rgs:MSClus.rgs -tlb:MSClus.tlb -dll:foo.dll -replacements:replacements.manifest -identity:"type=win32, name=Microsoft.Tools.SampleAssembly, version=6.0.0.0, processorArchitecture=x86, publicKeyToken=6595b64144ccf1df" -out:rgstlb.manifest
|
|
|
|
|
Cool, thanks. Watch out for an upcoming article on using the Activation Context API to even trim off having to use manifests.
|
|
|
|
|
Guys,
I quickly rigged up a .NET Windows UserControl with few text boxes and methods based on an Interface. I have added a simple interface. When the object is loaded in IE, it shows as a missing image. Ihave gone through the ie settings a to make sure the security for actives is set appropriately. The dll was compiled with com enabled and is also strong named.
Framework: 2.0
IE: 7.0
Can some one give any advise on how I may solve this issue.
Thanks,
Shrini
|
|
|
|
|
It looks like the IE is not finding the Class to create an instance. is it correctly registered (with regsvr32 and the CLSID in the registry)?
You can debug the controls, via starting the IE in the debugger and open a html page with it
Greetings from Germany
|
|
|
|
|
Hi All,
It was my understanding that when an outbound call is made from an STA, the subsequent running of the message loop while waiting for that call to return would only process UI related messages (such as WM_PAINT) thus allowing the UI to remain responsive. However, I'm seeing a situation where it seems that additional messages (perhaps all messages) are being processed during this time. In my situation, multiple external threads are calling into the same method in the STA. During the execution of this method, an outbound call is made, thus I wind up with several concurrent executions in the same code path - something that was not expected. What messages are processed by an STA waiting on an outbound call?
I've read some about the IMessageFilter interface and it seems that this provides the capability to do what I'm talking about. Does its existence indicate that by default, no filtering occurs?
Thanks in advance for your help. Also, any references you could point me to would be greatly appreciated.
|
|
|
|
|
Synchronization of COM method calls within an STA is done via window messages. That's why an STA has to pump messages. The exact messages used for that purpose are an implementation detail. But even if you did know which messages they were, if you purposely didn't process them, you would cause a deadlock when an incoming method call happened - the caller is waiting for the method call to return, but you're intentionally not letting the method call happen.
|
|
|
|
|
I got an example which can play back a wavefile with streaming buffer.now,I modify some lines for Lan chat. However I try my best ,It doesn't work. So wanna your help.
Well,First I simulate this situation that 2 men chat. Set same WaveFormatEx two point,and One Point Read a wavefile and Send data to
the other PC.
The other PC Receive quiet well,I use the data to playback(stream buffer mode) ,but It does't work. Nothing can be Heard.
what's wrong in my app?
|
|
|
|
|
hi one and all,
iam having a problem with accessing serial port in my pc. i have developed an application which access the serial port in VC++ 6.0.After configuring the Serial port to 115200, iam able to send the data to the com port using WriteFile().But, iam unable to receive the data from the com port through ReadFile() operation and i have checked the error by using GetLastError() and it is given as 995(system error code).Even though i have restarted my system several times,iam unable to debug.
Please help me why this error is getting and how to fix this error?
Thanks in advance
Regards,
Praveen
|
|
|
|
|
Could you post the relevant code?
BTW this forum is about C omponent O bject M odel technology [^], not about serial port communication.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
C:\>net helpmsg 995
The I/O operation has been aborted because of either a thread exit
or an application request.
Most likely it simply timed out. See SetCommTimeouts for information.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
|
I create a ImageOle project to encapsulate Image to OLE object so as to display JPG,GIF,TGA... image in CRichEditCtrl. When dispaying animated GIFs,I coded in OnTimer:
IAdviseSink* pAdviseSink=NULL;
if(S_OK==GetAdvise(NULL,NULL,&pAdviseSink))
{
pAdviseSink->OnViewChange(DVASPECT_CONTENT,-1);
}
TCHAR buffer[100];
_stprintf(buffer,_T("OnTimer:Frame :%d,Total:%d\n"),
m_pImageObj->GetFrame(),
m_pImageObj->GetNumFrames());
OutputDebugString(buffer);
I traced the debug string(by above ::OutputDebugString),the frame of Gif switch as expectedOnTimer,and meanwhile by calling OnViewChange ,I get the control container call
HRESULT CImageAnimator::OnDraw(ATL_DRAWINFO& di),the draw operation is also okay,However,for some unknown reason, after OnDraw,My Ole Control is not visually updated in CRichEditCtrl,it is always stayed in Frame 0 although I have updated the frame index and called the container to update the view of my control.
I think the pAdviseSink->OnViewChange and OnDraw mechanism doesn't work as I expected, it seems that the OnDraw operation doesn't work.
|
|
|
|
|
Dear sir,
1.we are developing one video-email project. in that we are using "CODEC" com object for video recording & displaying.
2.Coder records the viddeo. Decoder Disply the video.
3.We used Windows Media Encoder 9 series SDK.
4.we used WME-Interfaces(we used WMEncoder & IWMensouce Interfaces,... ) for recordig video,displying video etc....
5.NOW I WANT TO CHANGE VIDEO SETTINGS LIKE: "Brightness" & "color" & "sharpness" of the video
6.to change the video settings i want one API. i dont knoew how to use the the API call for changing the video settings
7.i have UI (User Interface) with 3 SLIDER BARS(track bars) to increase or decrease the brightness,color,sharpness.
8.i have 3 buttons(APPLY,CANCEL,OK) in that UI to change the settings.
9.And i have a DEFAULT button to set the brightness,color,sharpness to default.
9. while drag the SLIDER BAR forward/backward the brightness,color will increase/decrease respectively.
10.when i click on apply the settings will apply to the video.
this is my requirement please help me to complete my project.its urgent.
Regards,
Balaji.
|
|
|
|
|
Hi,
I'm writing a C# class that will be used by a VB6 application. The class has a method that needs to return an array of custom objects.
Initially I just couldn't get this to work. I got a "type mismatch" error every time the call was made in VB.
then I found this[^] page which suggested tagging the interface with [return: MarshalAs(UnmanagedType.AsAny)]. This got it working.
My question is why does this work?
As I understand it, MarshalAs(UnmanagedType.AsAny) dynamically detects the type and marshals as the correct type, but I know what type it is, why wouldn't VB accept it as an array of MyClass. MyClass is fully com visible and VB is happy to use it fine in several other areas, it just doesn't like the MyClass[] when returned from a c# method.
I've programmed C# & VB6 separately loads before, but this is my first attempt at any interop.
Can anyone explain or point me at a good resource?
Cheers
[Sorry if this is the wrong place to ask. I know it's VB6 - C#, but I thought the problem is more related to the COM interop factor. If anyone thinks otherwise, shout and I'll move it]
Simon
|
|
|
|