|
dnh wrote:
I think that what Roger is talking about it compiler that would compile C# code into STANDALONE executable, not dependent on .NET framework. That IS dumb idea.
And why is that idea so stupid? I don't think that it's unreasonable to think about an application that ships with static libraries (in this case, linking the .NET framework into the application). The deployment and testing is really easier and safer when you use static linking. Why? Because you don't have to test with every possible version of the .NET framework, and every different patch set to check if your application works fine. Did you ever try to deploy and support an application on 10,000 machines, in around 300 different companies? You'd give a leg for a static linker...
And the origional post mentioned that static linking and native code compilation would remove a lot of .NET features, e.g., reflection. I disagree, unless someone proves me that: when a .NET application is loaded, it's JIT compiled to native code (if it wasn't pre-compiled by NGEN), and then linked to the .NET framework, which was compiled to native code by NGEN upon installation.
So, can someone explain me why is it so dumb to do all this on the programmers machine, instead of doing this on the user's machine? The only drawback I can see is losing a few machine specific optimizations (which still could be done by generating several versions).
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
ok maybe I didn't express myself clear. How I understood Anonymous' question is, forget .NET, I want to compile C# directly to native, just like C++ does. That's different from static linking, is it not?
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
dnh wrote:
ok maybe I didn't express myself clear. How I understood Anonymous' question is, forget .NET, I want to compile C# directly to native, just like C++ does.
No, he wants to take an MSIL executable and compile to native code, and statically link the parts of the .NET framework needed.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
Hi all,
I am facing a problem i am using office 2003's smartdocument feature to generate a doc and want to convert it to a pdf doc using c#.net but the problem is i also want the hyperlinks mentioned in the smartdoc to be active hyperlinks in pdf pls help me with the solution
Need ur help
|
|
|
|
|
#define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0')
unsigned char BinKey[16];
for(int i=0; i < KeyEdit->Text->Length; i=i+2)
{
BinKey[i>>1] = (unsigned int)(hextobin(KeyEdit->Text->get_Chars(i)) << 4) + hextobin(KeyEdit->Text->get_Chars(i+1));
}
converted c#
string hexKey = "ffffffffffffffffffffffffffffffff"; //32 f s'
int byteLength = hexKey.Length/2;
byte[] bytes = new byte[byteLength];
int j=0;
string binKey = "";
for (int i=0; i
|
|
|
|
|
|
Does anybody know how to get the size in memory of an instance of a manged object. The more I look for an answer, the stronger my suspicion gets that it's not possible.
|
|
|
|
|
Did you try System.Runtime.InteropServices.Marshal.SizeOf ?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Yip, I tried it but It can only be used for unmanaged types.
|
|
|
|
|
This blog[^] seems to give answer you are looking for. But I don't know how about .NET 2.0
David
|
|
|
|
|
Hi all!
I've a slight problem bugging me for some time now and was wondering what you think to be the best solution:
In the installation package (.msi created from a setup project in VS2003) of my app I'll have to perform some custom actions after the installation has finished. For example, modifying config files to reflect user input during installation.
This is done in a custom action on install. The custom action itself is an installer class written in C#.
So far, so good. It works fine when you run the setup from a CD or a local drive, but often the application isn't installed on a single machine only, but several machines in a network.
Now when you put the .msi on a network folder and run it from there the custom action usually chokes because of security settings in .NET.
When run from a network location, the custom action assembly doesn't have the neccessary access rights for local files and the registry.
So you either have to copy the installation package to a local drive or adjust .NET security settings for your network (and, if you want to run the installation from an UNC path, even for your Internet zone!).
What's the best way to deal with this?
Re-write the custom action classes in unmanaged code?
Modify .NET security settings during installation somehow?
Any other way?
Thanks in advance for your feedback...
mav
P.S.: Another point to consider is when I want to include the installation of .NET framework in my setup, then there's no way to manually adjust security settings before the installation of my app....
|
|
|
|
|
Hi,
I am struggling in using dataset or traditional dataReader in ADO.Net.
It seems to me that if I use the dataset (direct bind it to UI), then the dataset will replace the object model layer, so it seems only good for simple application development without much object model logic.
If I insert a object layer
above the dataset, then it seems no difference from the traditional
approach by using DataReader with SQL query. Then what is the goodness
of dataset ?
And if I use dataset, the cached data by read/write in the dataset will be lost if the application hang, so the cached data by read/write should be restricted within the scope of one transaction.
Are all my perceptions on using dataset above right ? Any comments?
Thanks
|
|
|
|
|
Hi All
I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and a list of methods with parameters, he wants to execute and I have to get the results.
I have some solution to this problem. Right now i am using WSE to solve this problem. My code is:
Dim env As SoapEnvelope
Dim epr As EndpointReference
Dim client As MyHttpClient
Dim rs As SoapEnvelope
Dim bodyResponse As String
env = New SoapEnvelope
env.Context.Addressing.Action = New Action("http://tempuri.com/TestWebService/MyService/HelloWorld")
env.CreateBody()
env.Body.InnerXml = String.Format("<HelloWorld xmlns=""http://tempuri.com/TestWebService/MyService/"" />")
epr = New EndpointReference(New Uri("http://localhost/TestWebService/MyService.asmx"))
client = New MyHttpClient(epr)
rs = client.Hello_World(env)
bodyResponse = rs.Body.OuterXml
TestReport.Text = bodyResponse
Imports System.Xml
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports System.Web
Public Class MyHttpClient
Inherits SoapClient
Public msg As String = String.Empty
Public LoadTesterForm As LoadTesterForm = Nothing
Public Sub New(ByVal dest As EndpointReference)
MyBase.New(dest)
End Sub
<SoapMethod("http://tempuri.com/TestWebService/MyService/HelloWorld")> _
Public Function Hello_World(ByVal envelope As SoapEnvelope) As SoapEnvelope
Dim response As SoapEnvelope
response = MyBase.SendRequestResponse("HelloWorld", envelope)
msg = response.Body.OuterXml
Hello_World = response
End Function
Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope)
MyBase.FilterMessage(envelope)
End Sub
End Class
I am getting the response back with this code.
Main problem is env.Body.InnerXml, Here we need to specify all the parameters & method name as XML. But i dont have parameter names.
One solution to this problem might be i can generate proxy class at runtime. Can anybody guide me to the right direction?
Thanks a lot
Sumit Domyan
|
|
|
|
|
Can someone point me in the right direction? I have an application shell with a status bar. the shell is going to download assemblies and dynamically creating menu items and toolbar buttons to call the forms from the downloaded assemblies to load up in the shell. How do the downloaded assemblies talk to the shell like write something to the status bar? How should i set the framework up?
misticat
|
|
|
|
|
I have an excel file with 3 sheets.
I want todrag 1 sheet on to my form and do some custom stuff with it.
and links on how or help?
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi;
Any suggestions for a Form (not ASP .NET) tree control - I need one that can have check boxes on just some lines and the .NET one is all or nothing.
And a PropertyGrid control? The .NET one has everything I need but when called from my Word Add-In code none of the attributes work.
??? - thanks - dave
|
|
|
|
|
I would override the ownerdraw by extending the Treeview
my half a penny
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
the treeview dont support ownerdraw ... unless your into some heavy api interopping...
Its pretty much easier to create one from scratch than to do the api customdraw stuff on treeviews.
|
|
|
|
|
Igot the MFC treeview confused again.
I forgot that MS did a rush job in the TreeView which is crap anyhow.
Sry,Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I want to pick my own colour of the bar instead of those green bars, and i want to have solid colours instead of bars of colour.
|
|
|
|
|
Solid bars are just a property you can set. For the colour, you'll need to draw it yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
they're all options of the progress bar, but if you want a totally customized progress bar, look into owner drawing, or you can write your own class its easy for a progress bar
IM PROUD TO BE A GMAIL;
|
|
|
|
|
The Undefeated wrote:
I want to pick my own colour of the bar instead of those green bars, and i want to have solid colours instead of bars of colour.
There are so many custom progress bar controls here on CP, you should be able to find exactly what you want.
Marc
My website
Latest Articles:
Object Comparer
String Helpers
|
|
|
|
|
Hi all,
I am using a KerberosToken for my signing and encryption when calling a WebMethod on my WebService. It all seemed fine, until our work domain changed, and now we manage our own domain (domain controller).
Everytime I call a WebMethod, I get an exception "The signature or decryption was invalid". I've looked around online, but can't find anything that will help.
I then tried the Kerberos sample that comes with WSE 2.0 SP3. I had the client on a XP SP2 machine, and the WebService on a Win 2003 Server SP1 machine, an I get the same exception even with the Microsoft sample.
Can anyone shed some light on this, as I don't know what to look at next?
Appreciate any help anyone can give, or even a direction I go in to look into it further.
Cheers
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
I believe most of this was to do with a time difference between the client and the server.
Future tests showed that my software worked with a Kerberos token for 'n' amount of time, and then I would start getting errors. I'm not talking about, constantly working. I mean, closing the application and starting it again, I would still get bizarre Kerberos token errors.
I've therefore stopped using it. It was a good at the start, but too unpredictable.
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|