|
They use the same .config file.
James
- out of order -
|
|
|
|
|
I have a component that we need to move out of the .NET world and expose to a VB6 application. In the IDE, I checked the box to register for COM and I tried to follow the advice given in the popup box.
So I strong named the assembly. That, with the checkbox, gave me the dll and the tbl file after compilation. I seem to still be missing the metadata file for the component and that is stopping the VB6 code from seeing the methods and properties. Is this something I must build manually? If so, how do I know the format of the metadata file???? If not, what am I missing that is preventing the metadata file from being built when I compile?
Any help is greatly appreciated.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Well, you already have the 2 pieces needed to use your COM objects. Part of the process is that the type-lib and assembly files (tlb & dll) need to be registered using regasm.exe. That utility can be found wherever the .Net Framework is installed - typically in the folder "C:\WINNT\Microsoft.NET\Framework\v1.0.3705" on Windows NT & 2K.
I've found that I don't need to register the tlb file since when I regasm the dll, it also does the embedded tlb as well (it also MAKES a tlb file for you too).
I should think that this is being done for you when you compile your project. However, this is a project setting and may not be set/active/non-existent in your project.
|
|
|
|
|
Hi John.
Here is all that we have done so far.
I added COM Visible(true) for all of my public properties and methods.
I added a [ClassInterface(ClassInterfaceType.AutoDual)] at the head of my class library.
I compiled it and sent the DLL and TBL file to the developer.
He did run RegAsm (he has been doing it every time)
This last attempt he did a
regasm myclass.DLL /codebase /tlb:myclass.tlb /verbose
When he creates reference to the DLL and looks in the object viewer, he is not seeing anything inside the class library. The constructor is visible (obviously) but no public accessors or methods.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Does anyone know of a good way to marshal data into an unmanaged array of structs.
I tried using StructureToPtr with an incremented IntPtr, that I've allocated with
Marshal.AllocHGlobal, but it doesn't seem to work.
|
|
|
|
|
I have been researching how to customize what is drawn in a list box. The docs are great and I have had good advice and have samples of drawing images and custom strings and even multi-column lists. However, I need to find out if I can create an instance of a cust control as the item in my list box. I know the drawmode must be set to ownerdrawfixed. I also hook into the drawitem event that the listbox raises...but can't quite figure out how to get my control to draw in the list box.
|
|
|
|
|
Hello:
I was trying my first example of a .aspx page. I have .Net Framework and its SP2 installed (I did it twice!). I keep getting this error while trying to retrieve the page through the browser:
============================================================================
Server Error in '/testsite' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1595: 'System.Collections.ArrayList' is defined in multiple places; using definition from 'C:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll'
Source Error:
Line 49: private static bool __intialized = false;<br />
Line 50: <br />
Line 51: private static System.Collections.ArrayList __fileDependencies;<br />
Line 52: <br />
Line 53: public bmpSave_aspx() {
Source File: C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\testsite\29dafa64\9b4d9e5c\mwsj-thi.0.cs Line: 51
Show Detailed Compiler Output:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\csc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\testsite\29dafa64\9b4d9e5c\mwsj-thi.dll" /debug- /optimize+ /warnaserror /w:1 "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\testsite\29dafa64\9b4d9e5c\mwsj-thi.0.cs"
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\testsite\29dafa64\9b4d9e5c\mwsj-thi.0.cs(51,24): error CS1595: 'System.Collections.ArrayList' is defined in multiple places; using definition from 'C:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll'
===========================================================================
the erroneous code is not part of my code. I think is code generated by the compiler. What could I do? I have reinstalled the .Net Framework for the second time and nothing changes.
Thanks in advance for any answer/hint. Anyone with similar weird compilation errors?
Regards, Juanma.
_.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`
Juan Manuel Gómez Ramos
B.Sc. Computer Science
eMail:<cronosxfiles@yahoo.com>
eFax:+1-707-313-0329 (USA) +44-870-125-4936 (UK)
http://chronos.itgo.com
^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._
|
|
|
|
|
Hi,
I just can't find any classes that provide System Information (like the OS for exanple). Can anybody show me the right direction pls?
Thanks a ton,
Matthias
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
SystemInformation has some information,but not OS version.If you didn't find it,you can use win32 API,GetVersion
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
|
Hi,
thanks a lot. Environment was the correct answer. MSDN didn't spit it our and I'm really getting tired of the huge MSDN Lib where you just can't find anything ;(.
Once more, thanks for the sound advice.
Matthias
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
Hi,
How can I call my existing MFC based Dll (developed in VC 6) functions/ classes from ATL Web service/ Managed C++ Web service?
Atin.
|
|
|
|
|
:-OI need to make the datetimepicker control in my project be flatten, but I don't know how to do it. Pls help me find the solution or give me the address to find this! Thanks in advance
ChanPhuong
|
|
|
|
|
Can anybody tell me how to find out if a Culture got by CultureInfo.CurrentCulture has Right-To-Left or Left-To-Right
reading order?
I just can't find a member for that purpose...
Thanx
John
|
|
|
|
|
I'm working on a distributed application, and I would like to only have the WinUI on the client machine, and keep DataAccess, BusinessRules, BusinessFacade and so forth, on a server. Is this posible? If so, how? Does anyone know of any articles related to this?
this program will be used from anywhere between three and three hundred people at a time.
excuse any typing mistakes, its 4am
~Dan
|
|
|
|
|
Dan Smith wrote:
Is this posible?
Yes
Dan Smith wrote:
If so, how?
There are several different ways of doing this and what you use depends on your requirements.
The easiest way is to expose a webservice on your server and have the WinUI use it. There is a section on webservices which may enlighten you on how to create them, if you're using VS.NET they're easy to use as well (right click on the WinUI project and choose Add Web Reference, then point the mini-browser to your deployed web service).
By default web services are stateless, but it should be possible to use the ASP.NET Session stuff to persist bits and pieces.
Your next option is to use Remoting. Remoting is a bit harder to put together and use, but it is more powerful as well. Nish wrote a good article on the basics of remoting. http://www.codeproject.com/csharp/absoluteremoting.asp[^] You may also want to check out the sample chapter from Ingo Rammer's book for a bit more indepth look Advanced .NET Remoting[^].
Good luck,
James
- out of order -
|
|
|
|
|
Start with building a ASP.NET Web Service. This class will be your Facade, and will invoke your business rules, and data access layers. If your architecture supports .NET code on both client and server, you can pass managed DataSets across the boundry, which will make both sides easier to write. From what I understand, you UI will be a System.Windows.Forms application. You add a web-reference to your ASP.NET Web Service to that project, and invoking methods on the facade will be a breeze.
For example, the UI want's to start with a list of customers. It calls a method on the facade: GetCustomerList( string territory ) which returns a DataSet. Behind the facade, you've got business rules that check if the user is authorized for that territory, etc. Once validated, a data access layer pulls a limited set of fields needed for this list out of the databse, limited to the specified territory, and returns it as a DataSet. This list might have just Customer Name, City, State, ZIP and ID.
Back on the client, you can drop that dataset write into a grid control to format, scroll, etc. Without round-tripping, you can sort of any of the fields. Once the user selects a customer, you call another facade method: GetCustomerDetails( string customerID ) which also returns a DataSet. If changes are made, call facade method UpdateCustomerDetails( DataSet details ).
Hope that gets you started...
Burt Harris
|
|
|
|
|
Burt Harris (msft) wrote:
From what I understand, you UI will be a System.Windows.Forms application. You add a web-reference to your ASP.NET Web Service to that project, and invoking methods on the facade will be a breeze.
Absolutely, here is a plug for my most recent article that cover how to do this: Cross Language Web Service Implementation[^], which includes a Windows Forms Web Service consumer application.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
I have a MSI installer for my system. It's running smoothly on several machines, but in one specific machine, it isn't working. The MSI installs several ServicedComponents with custom install actions. Some of the ServicedComponents call COM components and apparently everything is fine and registered ok. But in this specific machine, the installer starts and goes until it shows the following error:
Install Error: Failed to generate type library 'c:\program files\crivo\drivers\bin\DriverBalanceamento.tlb'
for 'DriverBalanceamento, Version=1.0.1069.31940, Culture=neutral, PublicKeyToken=b8bf1c10d7a7a24d'.
Install Error: There is no MTS object context
I see dumb people
|
|
|
|
|
|
For future reference, if someone have the problem:
What I needed to do to solve it was:
(the order HAS to be this: )
1. uninstall the .MSI
2. uninstall the .NET framework
3. reinstall the .NET framework
4. apply .NET framework SP2 (don't know if it's required, but I did this way just to be safe)
5. reinstall the .MSI
The tricky part was (1) to uninstall the .MSI, since it was giving the same message when uninstalling. So, the solution was to use a .MSI without the custom actions which install the COM+ components, mantaining the MSI version number and product code. Use this MSI to remove the faulty application. The rest seems necessary to rebuild the GAC again.
I see dumb people
|
|
|
|
|
After install .Net framework, the programme also can't run right( mfc70.dll is not include in framework ). is that other components need install?
|
|
|
|
|
I hope you don't believe MFC has anything to do with the .NET run-time.
|
|
|
|
|
I'm trying to get my hands on the beta2 version of the .NET Compact Framework. Unfourtunatly, it is only available with VS.NET 2003 (VS.NET 2002 will not support smart device extentions).
You'd think after spending about $1000 for MSDN Subscription Professional edition, I could at least get a copy of VS.NET 2003 beta. For some reason, MS chose to only make it available to Universal subscribers, not fair! When I signed up for MSDN Pro, I was told I would get access to all beta versions of operating systems, sdks and visual studio.net.
If anyone can comprehend MS's thought process, please help me out.
|
|
|
|
|
$$$$$ is all that matters to M$. And Bill needs some more since he keeps givig BIG$ away to organizations and nations that don't want it....
R
|
|
|
|
|