Home > Net >  C code in C #
C code in C #

Time:09-30

Ask everybody that this encryption dog how c + + code into c # code, for not familiar with c #,

Char * PPSW="12341234";//can password
Char p256 [65].
Unsigned long uAddr;
For (uAddr=1; UAddr<17. UAddr++)
{
if(! ReadLock (uAddr, p256 + (uAddr - 1) * 4, PPSW, 0, 0))
break;
}

ReadLock are defined as follows: the unsafe public static extern int ReadLock (int uAddr, void * pBuffer, String pass, uint uSerial, uint uMini);

CodePudding user response:

Can you write that down is better, but at this point to turn?

CodePudding user response:

reference 1st floor HKQ358467 response:
would you write that down is better, but as it turned what's the use?
great god, help me, this just a turned,

CodePudding user response:

refer to the second floor zhang123454lulu response:
Quote: refer to 1st floor HKQ358467 response:

Can you write that down is better, but at this point to turn?
great god, help me, this just a turned,

ReadLock methods is directly from the c + + kao you come and add a usafe? The best way to rewrite well, too, used in C + + ReadLock void * C should be exported as a DLL adding extern "C", so can't use the function overloading, in C, parameter is null pointer of type, mean that can accept any type of pointer, because no function overloading the C language function, can't define some of the same name function, can only use a pointer to a pointer to receive any type of empty type, to realize the function similar to a function overloading in C + +, you rewrite it should keep the usafe code,
  •  Tags:  
  • C#
  • Related