Click here to Skip to main content
15,884,176 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
General.NET Framework Configuration Pin
Small Rat20-Apr-04 10:48
Small Rat20-Apr-04 10:48 
GeneralRe: .NET Framework Configuration Pin
Mike Dimmick21-Apr-04 1:07
Mike Dimmick21-Apr-04 1:07 
QuestionIs the Framework needed for a DLL? Pin
Cybermantis20-Apr-04 10:25
Cybermantis20-Apr-04 10:25 
AnswerRe: Is the Framework needed for a DLL? Pin
Mike Dimmick21-Apr-04 1:04
Mike Dimmick21-Apr-04 1:04 
AnswerRe: Is the Framework needed for a DLL? Pin
Jitendra gangwar27-Apr-04 4:56
Jitendra gangwar27-Apr-04 4:56 
GeneralPOP3 Component designed in VB Pin
Suman7620-Apr-04 2:31
Suman7620-Apr-04 2:31 
GeneralFailed in calling Manged Method from Unmanged code Pin
sanjay.attri20-Apr-04 1:30
sanjay.attri20-Apr-04 1:30 
GeneralDelphi to VB .net or C# Pin
Patkua19-Apr-04 21:08
Patkua19-Apr-04 21:08 
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.
GeneralRe: Delphi to VB .net or C# Pin
Andres Coder27-Apr-04 7:37
Andres Coder27-Apr-04 7:37 
GeneralNGEN Pin
Michael Russell19-Apr-04 12:27
Michael Russell19-Apr-04 12:27 
QuestionHow to display an existing crystal report in .net framework Pin
mathewsvipin19-Apr-04 4:35
mathewsvipin19-Apr-04 4:35 
GeneralChannels in Remoting Pin
Ivan Fernandez19-Apr-04 3:44
Ivan Fernandez19-Apr-04 3:44 
GeneralQuestions about ObjectSpaces Pin
hsupercn18-Apr-04 23:05
hsupercn18-Apr-04 23:05 
GeneralRe: Questions about ObjectSpaces Pin
Colin Angus Mackay18-Apr-04 23:25
Colin Angus Mackay18-Apr-04 23:25 
GeneralRe: Questions about ObjectSpaces Pin
hsupercn19-Apr-04 18:55
hsupercn19-Apr-04 18:55 
GeneralRe: Questions about ObjectSpaces Pin
Anonymous22-Apr-04 12:37
Anonymous22-Apr-04 12:37 
GeneralDenormalizing a unicode string Pin
Colin Angus Mackay18-Apr-04 14:52
Colin Angus Mackay18-Apr-04 14:52 
GeneralThe Answer Pin
Colin Angus Mackay18-Apr-04 23:10
Colin Angus Mackay18-Apr-04 23:10 
QuestionAppBars in .Net ? Pin
Mad__18-Apr-04 4:20
Mad__18-Apr-04 4:20 
AnswerRe: AppBars in .Net ? Pin
Andres Coder18-Apr-04 7:21
Andres Coder18-Apr-04 7:21 
GeneralRe: AppBars in .Net ? Pin
Mad__18-Apr-04 21:36
Mad__18-Apr-04 21:36 
QuestionWhat is a hashtable ? Pin
Andres Coder18-Apr-04 3:20
Andres Coder18-Apr-04 3:20 
AnswerRe: What is a hashtable ? Pin
Mike Ellison18-Apr-04 19:27
Mike Ellison18-Apr-04 19:27 
Question.net security tools? Pin
pelos18-Apr-04 2:03
pelos18-Apr-04 2:03 
AnswerRe: .net security tools? Pin
partyganger18-Apr-04 4:40
partyganger18-Apr-04 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.