|
Or by Portal Server if you need a full secure scalable online document repository and versioning control system with all the bells and whistles.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Hi
I developed a C# interface, that will be called by the VC++ code and it is working fine.
For deployment I am registering the C# dll in the client machne using the regasm.exe tool.
Now I am planing to develop my own MSI application using Installshield,
any idea how to do this?,
One more point I understand is it is not required to call regsvr32.exe to rigister a COM component if I am doing the deployment through MSI application.
sarma
|
|
|
|
|
I just did the same thing (but with a VB.Net assembly).
You have to create an installer class in the assembly and make the installer call it. This is pretty easily done if you create a .net setup project, not sure how you do it in Installshield (last I used it was way back in version 5.5 )
I actually got the information from the web (but can't remember the location now). In any case, the main thing is to override two functions in the installer class. Here is the VB.NET code:
Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
MyBase.Install(stateSaver)
Try
Dim regSrv As System.Runtime.InteropServices.RegistrationServices
' Register the assembly
regSrv = New System.Runtime.InteropServices.RegistrationServices
If Not regSrv.RegisterAssembly(Me.GetType().Assembly, Runtime.InteropServices.AssemblyRegistrationFlags.SetCodeBase) Then
Throw New System.Configuration.Install.InstallException("Failed to register componenet for COM interop")
End If
' Add System Resource Category Key
' Microsoft.Win32.Registry.ClassesRoot.CreateSubKey()
'("CLSID\\{6fa89f84-721a-4c79-bff4-62291fd56940}
'\\Implemented Categories\\{4FCF59B1-AE57-11d3-B9A3-
'00104BD14AB6}")
Catch ex As System.ExecutionEngineException
MsgBox(ex.ToString)
End Try
End Sub
Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
MyBase.Uninstall(savedState)
Try
Dim regSrv As System.Runtime.InteropServices.RegistrationServices
' Unregister the assembly
regSrv = New System.Runtime.InteropServices.RegistrationServices
If Not regSrv.UnregisterAssembly(Me.GetType.Assembly) Then
Throw New System.Configuration.Install.InstallException("Failed to unregister componenet for COM interop")
End If
' Remove System Resource Category Key
' Microsoft.Win32.Registry.ClassesRoot.DeleteSubKey()
'("CLSID\\{6fa89f84-721a-4c79-bff4-62291fd56940}
'\\Implemented Categories\\{4FCF59B1-AE57-11d3-B9A3-
'00104BD14AB6}")
Catch ex As System.ExecutionEngineException
MsgBox(ex.ToString)
End Try
End Sub
I don't remember what the registry key bits were for but I remember that for most assemblies you could just comment them out (so I did).
Sorry if my reply is a little 'air headed' but I only spent about 3 hours on it. I did a search on the web, copied, pasted, it worked, I moved on to writing some more code!
|
|
|
|
|
hi skrishnasarma,
What you said is right, you no need manually do regsvr32.exe to register COM, If you are using install shield, when you are creating MSI file, you have to mention what are all dll/COM components you need (dependecey on) then make MSI file.
Once MSI file is create that will take care of registering the COM components.
|
|
|
|
|
Hello all. Much Googling has yielded no satisfactory answer to this, and I'm hoping someone here knows how I might solve my problem. I'm trying to embed Windows Media Player 9 in my Windows Forms application using MC++. If I drop it on the form and run, it's happy. But as soon as I try to set any WMP-specific properties, I get the error
An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.wmplib.dll Here's my InitializeComponent() function:
void InitializeComponent(void)
{
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(TMVideo::TMVideoControl));
this->axWindowsMediaPlayer1 = new AxInterop::WMPLib::AxWindowsMediaPlayer();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->axWindowsMediaPlayer1))->BeginInit();
this->SuspendLayout();
this->axWindowsMediaPlayer1->Enabled = true;
this->axWindowsMediaPlayer1->Location = System::Drawing::Point(48, 40);
this->axWindowsMediaPlayer1->Name = S"axWindowsMediaPlayer1";
this->axWindowsMediaPlayer1->OcxState = (__try_cast<System::Windows::Forms::AxHost::State * >(resources->GetObject(S"axWindowsMediaPlayer1.OcxState")));
this->axWindowsMediaPlayer1->Size = System::Drawing::Size(232, 216);
this->axWindowsMediaPlayer1->TabIndex = 0;
this->axWindowsMediaPlayer1->enableContextMenu = false;
>>> this->axWindowsMediaPlayer1->uiMode = S"none";
this->Controls->Add(this->axWindowsMediaPlayer1);
this->Name = S"TMVideoControl";
this->Size = System::Drawing::Size(368, 336);
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->axWindowsMediaPlayer1))->EndInit();
this->ResumeLayout(false);
} I added the two lines where enableContextMenu and uiMode are being set. Without those, the control loads and displays without a crash - but it's not the behavior I want from it. Does anyone know what I'm doing wrong? Thanks, Mike
"We've reached the point where the first duty of intelligent men is to restate the obvious." -- George Orwell
|
|
|
|
|
I recently moved to Windows XP SP2 and one of my projects is involving remoting. I'm using standart technology for this - tcp channel on port 8080 and binary formating. Now i can't run my project - it freezes when i step over the romoting calls. After long waiting something to happen i stop the process, but the strange is that I don't get a single exception or something alike.
One possible problem is Windows Firewall, another is my firewall - Panda internet security. So my question is how to bypass this problem or how to make my firewall ask me if I want to block this particular application or not - it doesn't ask me
Please help.
Thanks in advance!
by LA
|
|
|
|
|
Hello all,
I want to automate my builds. I have around 15 DLLs with interdependencies and I can't find a smooth way to do it. I am tried NANT with no luck. Perl scripts and whatnot. Any insights?
Thanks in advance
Alberto Gattegno
Software Engineer
http://www.certagon.com
|
|
|
|
|
Nant works well for me, in combination with CruiseControl.NET. It can be challenging to set up, but definitely worth it in the long run.
Did you have a particular problem in Nant?
my blog
|
|
|
|
|
Hello,
I have an ASP.NET application that includes an administrative site built in VB.NET web forms, and web services that are using in conjunction with a Macromedia Flash fromt end. The web services are written in C#. There is also a class library written in C# that is used by the Administrative web forms.
The application runs as expected, however, when I went to deply the application, the production server at the client site, was running version 1.0 of the framework. They allowed me to install it on another server, but there are issues within their internal network that are preventing this from working properly and their security policies wil not allow me to make the changes necessary to run the application.
The client has come back and they are willing to pay for a re-write that will run on version 1.0 of the framework.
I am running visual studio 2003. I am looking for a tool that will do the conversion, or if it will be possible for me to make the needed changes or re-write the app in VS 2003.
I am the only .net developer for my company and I just started there a few months ago, so there is no older version of visual studio, so in an effort to make this project profitable, I need to convert this if at all possible with existing software or a reasonably priced conversion tool.
Any help would be greatly appreciated. Thanks.
-Andrew
|
|
|
|
|
Depending on whether or not your app uses functionality that was added or changed since v1.0 of the .NET framework, this can be as easy as directing your executable to use v1.0 or just recompiling the app under v1.0.
Here's[^] some information on the differences between framework versions as well as how to redirect your app to use the appropriate version.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Hi,
i am using .NET Compact Framework with Visual Studio C# .NET 2003 for a little PocketPC application.
I want to use the Clipboard but it seems to be not available in .NET CF.
Also i cannot find the method .Copy() within System.Windows.Forms.TextBox.
Does anybody has an idea?
Thanks in advance.
Greetings.
Matthias Glemser
|
|
|
|
|
I found a solution at http://www.opennetcf.org.
Great stuff.
Matthias
|
|
|
|
|
Hi
I developed a .NET class library that contains a function returns a string value. I have successful compiled and created a “dll”.And after I tried to export .NET “dll” to com library as “tlb”, file being created. But if I am using this “tlb” into VBA programming the class is coming.Functions and properties were not coming that is I can’t call the member functions. what i will do?
M.Sendilkumar
TVS Infotech Ltd
|
|
|
|
|
You need to register the dll for COM use with the regasm.exe tool.
|
|
|
|
|
Hi,
I am using collection to bind data to datagrid.
Dim oCars as CarCollections = New CarCollections
DataGRid1.DataSource = oCars
Everyithing work fine but there is a sorting problem.
If I do so, there is no sorting features in DataGrid. When I bind DataSet to Datagrid I can Sort data in DataGrid by clicking on columns header. DataGRid automaticly sort filled data according clicked colum.
When I bind datagrid to Collection that features is missing.
What should i do, in Collection class - CarsCollection, to have sorting features back
Thanks in advance
P.S. Sorry for bad English
... Never argue with an idiot, they will drag you down to their level and beat you with experience
|
|
|
|
|
|
Try this sub method using own datagrid name
Private Sub DataGrid2_SortCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs)
Dim dataGrid As DataGrid = source
Dim strSort = dataGrid.Attributes("SortExpression")
Dim strASC = dataGrid.Attributes("SortASC")
dataGrid.Attributes("SortExpression") = e.SortExpression
dataGrid.Attributes("SortASC") = "Yes"
If e.SortExpression = strSort Then
If strASC = "Yes" Then
dataGrid.Attributes("SortASC") = "No"
Else
dataGrid.Attributes("SortASC") = "Yes"
End If
End If
Dim dt As DataTable = getData()
Dim dv As DataView = New DataView(dt)
dv.Sort = dataGrid.Attributes("SortExpression")
If dataGrid.Attributes("SortASC") = "No" Then
dv.Sort &= " DESC"
End If
dataGrid.CurrentPageIndex = 0
dataGrid.DataSource = dv
dataGrid.DataBind()
End Sub
|
|
|
|
|
Hi,
I want to detetmin parent class
For instance there is a Cars collection with Car item.
Cars collection has some property that I need to access from Car item.
Cars collection
Property_01
Property_02
CarItem(s) (Type, Name, Year, ...)
I want to obtain the value of Property_02.
Every CarItem is already inside Cars collection and I am sure that there is way to obtain parent class.
How to do that?
Do not send answers like "You have to hold a reference to the CarsCollection in the CarItem"
I think that is something about iComponent or something similar.
Tancev Sasa
|
|
|
|
|
Tancev Sasa wrote:
Do not send answers like "You have to hold a reference to the CarsCollection in the CarItem"
Why not? As far as I can see it is the most obvious solution.
Tancev Sasa wrote:
I think that is something about iComponent or something similar.
Sure, the IComponent interface (note that it is an interface and you are going to have to create the implementation yourself), has a property called Site, which returns an ISite (another interface, meaning you will have to implement it yourself again) which manages the relationship between an IContainer (which you have to implement on your collection) and and IComponent.
And, guess what you are going to have to do in your eventual implementation for the IComponent, IContainer and ISite interfaces....
Do you want to know more?
|
|
|
|
|
|
Hello people,
If I use objects in the System.Data.SqlClient for database access do I need to include MDAC in my deployment setup?
|
|
|
|
|
|
I want Microsoft to alter the .net framework in such a way as to provide at least minimal protection for software developer's intellectual property and or licensing.
They designed just about the entire .net framework from the ground up to provide protection for users and didn't think to spend even 2 seconds worrying about the developers they are trying to convince to use it.
I know some of you are going to say "Well what can they do, it's an intermediate language" I know that, but the point is that *they* wrote it and they have many big brains on staff that could have considered the developers and *their* rights but I don't think they did for even a second.
The way it is now, every .net app is an "open source" app, whether you wanted it to be or not. You have essentially zero protection of your software and their only apparent solution is obfuscation which still makes cracking a license scheme a matter of a day instead of minutes.
At least in the Win32 days a certain level of knowledge was required to crack a skillfully written license protection scheme. You could be confident if you were compromised it was by experts, not by any moron with a two week knowledge of .net and a freely downloaded utility from the internet.
(No, I'm not ranting because we were cracked, I'm ranting in anticipation of having to devise some sort of license scheme for a very large .net application)
Microsoft have the advantage of course of controlling windows itself so if they release .net based apps in future they can probably work some protection for them right into the O.S. if need be. I'll be curious to see what they do.
Anyone with me?
Anyone know where to more effectively post this rant?
Am I dreaming that anything will ever get done?
|
|
|
|
|
Doesn't .NET already have some licensing framework?
my blog
|
|
|
|
|
For components it has some rudimentary bits you have to fill in. In terms of license protection it has absolutely nothing of consequence.
|
|
|
|