|
I would like to write a dll in C# .NET, however, I am concerned about compatibility on PC's that do not have the .NET Framework installed.
If using a DLL written in C# .NET, will that machine be required to have the framework installed? If so, must they install the entire framework? I'm concerned about download time for client PCs.
|
|
|
|
|
Yes, they will need the framework.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
It must require the .NET Framework installed.The DLL created in C# is the managed code. Which can only be execute on the .Net platform.
Jitendra
|
|
|
|
|
Hi,
I want to have a free POP3 component desined in VB.
I tried to get a POP3 component which is designed in VB. while trying to get a POP3 component, i came across some of those which are working well (for ex: WeOnlyDo), but all of them are providing trail versions. . I would like to know, whether can we build our own POP3 component in any other language?. (except using Socket Programming). Actually, I want to try it in ASP.NET.
Any idea or website reference would be hihly appreciable.
Thanks in advance,
Suman.
|
|
|
|
|
Hi,
I am working on an unmanged user interface .I am using the Service of a COM Executable that is also managed.
BUt to get the handle of the Com executable ,I have to go through Managed DLL(i.e this is the requirement).
I am able to retrieve the handle successfully, but some methods are failing.
The HR error value in these is 0x80131531
MSDN says that this exception thrown by the marshaler when it encounters an argument of a variant type that
can not be marshaled to managed code
I am helpless about this error.
Can anybody suggest some way to rectify it?
Thanks in Advance!
Sanjay
|
|
|
|
|
Can anybody help me convert this delphi code to vb .net or c#... tnx in advance... basically, what it does is compress data...
//Ex: '3F045F188888888867A' >> 3F045F1{89}67A
procedure BinToHexCompact(BinBuffer, HexCompBuffer: PChar; Const HexaSize, BinSize: Integer);
implementation
Uses Classes, SysUtils, PhUtils, PhRaise;
Const
Start_digit = '{';
End_digit = '}';
MinDigitsCompact = 5;
procedure BinToHexCompact(BinBuffer, HexCompBuffer: PChar; Const HexaSize, BinSize: Integer);
Var
LenH: Integer;
L: Integer;
H, HR: String;
Begin
Try
FillChar(HexCompBuffer[0],HexaSize, 0);
If (BinSize = 0) Then Exit;
LenH:= LenBuffer(BinBuffer[0], BinSize) Shl 1;
If (LenH = 0) Then Exit;
SetLength(H, LenH);
FillChar(H[1],LenH, 0);
BinToHex(BinBuffer, pChar(H), LenH shr 1);
HR:= CompacteBytesStr(pChar(H));
If (Length(HR) > HexaSize) Then ErrDevel(AEIP, 'PhUtils.BinToHexCompact, HexaSize trop petit');
Move(HR[1], HexCompBuffer[0], Length(HR));
Finally
H:= '';
HR:= '';
End;
End;
function CompacteBytesStr(Const BytesStr: pChar): String;
function isComp(pS: pChar): Boolean;
Var
i: Integer;
D0: Char;
Begin
Result:= False;
If (StrLen(pS) < MinDigitsCompact) Then Exit;
D0:= pS[0];
For i:= 1 To MinDigitsCompact - 1 Do
Begin
If (pS[i] <> D0) Then Exit;
End;
Result:= True;
End;
Var
i: Integer;
DigitStart, Digit: Char;
HasBeginDigit: Boolean;
DigitCount: Integer;
iLen: Integer;
R: String;
Begin
Result:= BytesStr;
iLen:= StrLen(BytesStr);
If (iLen = 0) Then Exit;
Dec(iLen);
If (iLen + 1 < MinDigitsCompact) Then Exit;
R:= '';
i:= 0;
DigitCount:= 0;
HasBeginDigit:= False;
DigitStart:= #0;
Repeat
If (i > iLen) Then Break;
Digit:= BytesStr[i];
If (i = iLen) Then
Begin
If HasBeginDigit Then
Begin
If (DigitCount > 0)
Then R:= R + IntToStr(DigitCount) + End_digit
Else R:= R + End_digit;
HasBeginDigit:= False;
DigitCount:= 0;
End Else R:= R + BytesStr[i];
End else If not HasBeginDigit And isComp(BytesStr + i) Then
Begin
HasBeginDigit:= True;
R:= R + Start_digit + Digit;
DigitStart:= Digit;
DigitCount:= - 1;
End Else If HasBeginDigit And (BytesStr[i + 1] = DigitStart) Then Inc(DigitCount)
Else If HasBeginDigit Then
Begin
If (DigitCount > 0)
Then R:= R + IntToStr(DigitCount) + End_digit
Else R:= R + End_digit;
HasBeginDigit:= False;
DigitCount:= 0;
DigitStart:= #0;
End Else R:= R + Digit;
Inc(i);
Until False;
Result:= R;
End;
end.
|
|
|
|
|
This looks fairly simple code to translate, except a few functions like "BytesStr[i]" and others witch I don't know how to replace...
In C# there are no submethods or global variables, so you need to place the whole thing into a class and seperate the method into 3 methods. The main thing doing that is to get right with the variables that are used in submethods in a main method.
<br />
public class Compact<br />
{<br />
private char startdigit;<br />
private char enddigit;<br />
...<br />
public void BinToHexCompact(...);<br />
public string CompacteBytesStr(...);<br />
public bool isComp(...);<br />
...<br />
}<br />
|
|
|
|
|
Is it possible to detect whether or not you are running from an NGEN'ed assembly or not?
I ask because as a side-effect of an NGEN experiment, I found that I can NGEN a running application without any problems.
Given that my assembly runs a bit faster NGEN'ed than not, I'd like to detect whether or not the .NET Framework has detected that my assembly is no longer NGEN'ed, and if it is not, NGEN it for next time the assembly is launched.
While the NGEN executable is able to detect whether or not your assembly has been NGEN'ed and does a quick exit if it has, I don't want to waste the cycles creating the process if I don't have to.
|
|
|
|
|
hi friends,
I have an existing crystal report with data (abc.rpt) in the server. I created a webfom in C# and if a link is clicked this report has to be displayed in the browser.It's working fine with the visual studio.net environment.
But i want to work this in the .NET frame work only.
I copied the application's .dll ,aspx pages and abc.rpt file to a system which have the .net framework installed.
I copied the CrystalDecisions.web.dll and CrystalDecisions.shared.dll to the bin folder.
When i clicked on the link in the aspx page, the error was "null reference exception-object reference not set to an instance of an object
CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e)".
1)Need i to copy any other dlls to bin folder?
2)Need i to register any controls?
Vipin k.mathews
|
|
|
|
|
Hello,
I want to establish the comunication between my application and the server in two diferent ways:
In one scenario, by compressing and encrypting the information. In the other one, only by executing a standard remoting call.
I thought to define two diferent tcp channels, but I don't know how to address the request through the right channel.
Any idea?
Thanks.
Ivan Fernandez
|
|
|
|
|
<sources xmlns="http://www.microsoft.com/ObjectSpaces-v1">
the question is how can i add the username and password. i've tried two methods:
1 Data Source=username:password@192.168.0.51
2 Data Source=192.168.0.51; user=username; password=password;
but neither of them works ,anyone can help me ,thanks!
P.S:The ObjectSpaces ,which i used,was published in 2002 and is in the namespace:Microsoft.ObjectSpaces
|
|
|
|
|
There is a blank area at the top of your post. Did you post XML or text containing <s and >s?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
sorry!
Below is what i want to post:
I can't connect to the database which requires the username and password. The connect.xml which i used is :
source name="Example" adapter="sql" connection="Data Source=LocalHost; Integrated Security=SSPI; Database=Northwind"/
the question is how can i add the username and password. i've tried two methods:
1 Data Source=username:password@192.168.0.51
2 Data Source=192.168.0.51; user=username; password=password;
but neither of them works ,anyone can help me ,thanks!
P.S:The ObjectSpaces ,which i used,was published in 2002 and is in the namespace:Microsoft.ObjectSpaces
|
|
|
|
|
source name="Example" adapter="sql" connection="Data Source=LocalHost; Integrated Security=SSPI; Database=Northwind"/
you need:
source name="Example" adapter="sql" connection="Data Source=LocalHost;
User id=sa;password=pw; Integrated Security=; Database=Northwind"/
|
|
|
|
|
I'm trying to find a method for denormalising a unicode string. In other words I want to take a string that contains accented characters and split it up into the letter and the accent. For example:
ç becomes c + ¸ (the cedilla)
ñ becomes n + ~ (the tilde)
This is because I want to compare two characters but the comparison must be accent insensitive and case insensitive. So u==U==ú==Ú==ü==Ü for instance.
The Compare method on the CultureInfo class doesn't appear to work the way I expected. If there is anything in the .NET Framework that can do this then that would be the best solution.
Any help would be great, thanks.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
Just to answer my own quesion:
I need to use the invarient culture. See the following example:
using System;
using System.Globalization;
namespace AccentInsensitive
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
CultureInfo ci = CultureInfo.InvariantCulture;
string s1 = "aA eE iI oO uU";
string s2 = "áÁ éÉ íÍ óÓ úÚ";
for (int i = 0; i<s1.Length; i++)
{
string cmp1 = new string(s1[i],1);
string cmp2 = new string(s2[i],1);
int res = ci.CompareInfo.Compare(cmp1, cmp2,
CompareOptions.IgnoreNonSpace |
CompareOptions.IgnoreCase);
if (res < 0)
Console.WriteLine("{0} < {1}", cmp1, cmp2);
else if (res > 0)
Console.WriteLine("{0} > {1}", cmp1, cmp2);
else
Console.WriteLine("{0} = {1}", cmp1, cmp2);
}
Console.ReadLine();
}
}
}
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
Hi all
Is posible make AppBar using .NET ?
|
|
|
|
|
Do you mean under "AppBar" a special toolbar that can dock at any desktop edge ? In that case I see no reason why not. As far as I know, it basicly just a form-like control that is stretched to a desktop edge. The only problem could be how the desktop size is reduced (so that icons would not get under the appbar), I think that is managed through a Win32 API call (in that case you should be able to import the dll that contains the functions, and if not, just make it auto-hideable).
|
|
|
|
|
Yes. This is managed through a Win32 API call, but API demand special combination of windows styles and extended styles. If yuo make ToolBar look window from Form, and then take windw extended style, you got 0 (but need WS_EX_TOOLWINDOW)
|
|
|
|
|
I've heared people talking about these hashtables a lot but I don't know what are they for (what are they good for). From the System.Collections.Hashtable namespace I can see it's some kind of collection. Could anyone please fill me up on this ?
Regards, Desmond
|
|
|
|
|
Hi Desmond. A hashtable is a collection object which contains items in key/value pairs. The keys function as indexes, and through them relatively fast searches are supported. Make sure you look at the examples in the .NET Framework documentation.
Here's a link to a W3Schools tutorial[^]
on hashtables you may find helpful.
|
|
|
|
|
hi forum,
I am going to work in a project related with electronic signature. The project (which is not well defined yet) must be developed with the Microsoft .NET technology. Really i don´t know anything about .net technology, so my question is:
Is MS .Net technology "especially helpful" in the development of this kind of applications?
...and if is possible, Could you give me any link/article/book which talks about this issue?
a lot of thanks and sorry for my poor english.
bye.
|
|
|
|
|
|
My C# project Form is splitted into two parts,
the left side is a tree view,
the right side is a PictureBox.
I want to design a function,
When I click the menu button <new_page>,
A new PictureBox will appear,
like the MDI Form does.
How to new a PictureBox like that...??
or there are other better solutions...??
My original PictureBox's image must be saved,
so I can't just change it's image,
But if I want to new many pages,
New many PictureBoxes doesn't seem to a good way...??
Please give me a hand,thanks a lot!!
|
|
|
|
|
you can save the picture and then load the new one
to save:
System.Drawing.Image img = pictureBox1.Image;
img.Save(path, ImageFormat);
to load a new one:
System.Drawing.Image img2 = System.Drawing.Image.FromFile(path);
pictureBox1.Image = img2;
|
|
|
|