|
hello,
in my prj i ve mat files that i want to add to the com builder of matlab which have version MATLAB COM BUILDER 1.0.
com builder add only *.m files and mex files(*.dll) pls suggest how to add mat file to com builder
|
|
|
|
|
I have referenced a VB6 DLL and I have access to it and all is well. The problem is that I have had to make changes to that DLL and other applications point to it.
The question is this, does the application need that original DLL in the original location or just simply registered on the server, and just trying this it looks like it needs to be in that original location??
Cleako
|
|
|
|
|
I'm on a .NET project, and I need to be able to (with .NET code):
1. Open a library that contains COM objects.
2. Find the class GUID, interface GUID, and description of each and every COM object in the library. In other words, it's sort of like using reflection on a COM library using .NET code.
Any help is greatly appreciated.
|
|
|
|
|
Hello,
Just check "Using Native COM Servers from .NET" article on MSDN.
Regards,
LF
|
|
|
|
|
Hi,
I have a doubt regarding memory sharing in a COM object.
Background: Recently we shifted to VS2005. Hence the dll written in VC6 is no longer directly useful. I might have to write a COM wrapper to access this dll. The application would be working with huge files and I want only a single copy maintained across my application. The dll should actually read the file and after the error checking send the a pointer of the memory to my application.
My question:
1) Is it possible to do it with COM?
2) What would happen if my COM object memory is on a remote server?
3) Does the COM object copy the memory and send it to the requested application or does it just pass the reference.
My intention is to maintain a single place of memory where the file data would be read and used.
Please let me know how can I achieve this through COM. Any links would be useful.
Regards,
Arti Gujare
|
|
|
|
|
ArtiGujare wrote: Recently we shifted to VS2005.
I believe you meant "it's managed code now"
ArtiGujare wrote: Recently we shifted to VS2005. Hence the dll written in VC6 is no longer directly useful. I might have to write a COM wrapper to access this dll
Do you really need COm wrapper or P/Invoke helps ?
http://www.google.co.in/search?hl=en&q=P%2FInvoke&btnG=Search&meta=[^]
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.
|
|
|
|
|
Thankyou Sohail.
I am a newbie to COM.
When I said we shifted to VS2005 I meant that the application using the dll was previosly written in VC6 and dll too was written in VC6. Now the application has to be written in VS2005 and still use the VC6 dll. My typical use case is:
1) Application send the file name to the dll.
2) dll reads the file at that mentioned filepath and does some file checks
3) if the file is in expected format, the dll returns the pointer pointing to the file data to the applictaion.
Can I achieve this using P/Invoke?
Regards,
Arti Gujare
|
|
|
|
|
P/Invoke is a way of invoking unmanaged code from within .NET (a rough description, for more and precise detials see MSDN )
If the code you have ported to VS 2005 is still unmanaged code then I don't see any reason why it's not working with your old VC6 DLL.
If your application when written in VS2005, is ported and made to be .NET complaint then please read on topics related to 'how to call unmanaged code/dll from within managed code' this will lead you to P/Invoke somewhere
http://en.wikipedia.org/wiki/P/invoke[^]
http://msdn.microsoft.com/msdnmag/issues/03/07/NET/[^]
http://msdn2.microsoft.com/en-us/library/aa446536.aspx[^]
Please read about P/Invoke basic and you will be able to decide based on your project needs what to use - P/Invoke or a COM wrapper
I hope this helps.
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.
|
|
|
|
|
VS2005 provides several programming languages. I assume that you continue to use C++. In this case you can just use your unmanaged DLL (written in VC6) as you have done before. It's your choice to make the application managed or unmanaged. If you make the application managed (C++/CLI), you may have to take special care when you are marshalling data (e.g. pointers or strings) from your unmanaged code to the managed one.
P/Invoke will only be required, if you you change the programming language for your application to a pure managed language, e.g. C#. If you are doing this, I recommend to have a look at http://pinvoke.net/.
Regards,
Tim
|
|
|
|
|
Hi,
i can suggest a simple solution for the problem.
you can check the value returned from your dll and
open the file using .net classes.
^-^
@|@
- redCat
|
|
|
|
|
is any body know how to develop simple program using above board, for sending commands such as ibread,ibfind,ibwrt,ibrd,ibfindd,ibclr,ibonline etc
using c/c++ lanagauage
regards
kishor
ackishor@yahoo.com
|
|
|
|
|
A few people might know, but they will either provide no answer or ignore your question. Reason - your question is not related to COM(Component Object Model). Try appropriate discussion board, possibly C++, to get quicker and appropriate answer.
Hope this helps!
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 all,
Does anyone know how to add a button to the Windows Explorer toolbar (Views, Organize, etc..)?
Thanks in advance.
|
|
|
|
|
|
MSDN just says BHO can attach to the Windows Explorer. There's no description on how to interact with the toolbar. Could you please elaborate a little bit more?
|
|
|
|
|
Search on CP returns me following articles[^]. Have a look at it.
|
|
|
|
|
I get the following error when running my web service now: "Retrieving the COM class factory for component with CLSID {value} failed due to the following error: 80070005.".
I know nothing about COM or utilizing VB6 in my applications and am just now starting to root around to find things out. This is something I havent found a solution to. I inherited a project from a programmer that is no longer here and all of the references and such were already setup. I have attempted to make some changes to a VB6 project that is used in this application but I did not copy anything over and this was working last week and now it isnt. Any help would be greatly appreciated.
Cleako
|
|
|
|
|
cleako wrote: error: 80070005
corresponds to Access related issues (E_ACCESSDENIED). Please confirm that you have appropriate access to instantiate that object
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.
|
|
|
|
|
I just checked the security on that DCOM listing and added IUSR since this is a web app and it made no difference. Is there something else I should be doing?
Cleako
|
|
|
|
|
Doesn't you need to give access to aspnet user ,I'm not sure, but asp.net webservice runs under a user having least previleges?
BTW, restart the PC after change to be effective.
|
|
|
|
|
IUSR_<computername> is the appropriate user for least privileges.
I did this and at first I got a 8007007e error and ran regsvr32 on the original DLL and that got rid of that error then the original 80070005 came back.
The issue I am having with all of this is that I cant follow the directions on http://www.ftponline.com/vsm/2002_04/magazine/features/rlhotka/[^] where it claims all I have to do is add a reference of the DLL produced by Visual Studio 8 and it should work. It just tells me there are no public properties so then I run the tool TlbImp.exe to output a DLL that can be accessed for whatever reason and I can then point to everything and access the class names but it throws that error during runtime.
Cleako
|
|
|
|
|
I am creating an automation client similar to Microsoft Office applications. Now, to expose the functionality of the application to the plugin, I have created a component "IAs" which is kind of a group for "IA". Now the thing is there may be as many as 2000 "IA" created at a single time and they are dynamic which means I may have to destroy all the 2000 "IA" and recreate them again multiple times.
Is using the method outlined above feasible? What kind of load would the PC have to bear? Would I be better of exposing just one interface and using that interface to manage the other sub components? Or would creating 2000 "IA" again and again be a better choice?
Please help.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
Is "IA" similar to an application or component IA's "State"? I believe you need to think about a better design by considering the fact that these IA instances are not like normal C++ objects. There is an amount of Marshalling, Cross Apartment access, and out of process calls required which may affect performance. The design choice should also consider these aspects and not just the frequent memory allocation for example.
So identify what exactly is the purpose of IA implemented instances and do you really need to expose them to client. Also how often will a "recreate" request come to you.
Also the design choice you are talking about is
1. Expose all interface directly
2. Use a Facade to expose the functionality instead (See facade design pattern)
Both work but only based on the exact need of problem you can find the best choice or a completely new way then what is said above.
What you have mentioned is abstract, if you can provide more details then we can help better.
These are my views so far. I hope they make sense in context of your problem
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.
|
|
|
|
|
|
HakunaMatada wrote: CommandBars and CommandBar Objects of the Office API
I would go by this.
Also you have now mentioned that the individual Element needs to be refreshed, which contrasts recreated.
Quick thoughts -
- You may have ICategory
- ICatgeory having a method which returns IElement collection
- Support enumeration of element collection - foreach in VB if required
- ICategory will have its own get/set properties to read and change its state or attribute
- IElement will have its own get/set properties to read and change its state or attribute
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.
|
|
|
|