Newbie using a method in C#

30 pts.
Tags:
C
Hi I need to get the checksum value of a machine and according to the documentation I think I need to use a method called LslGetProjectInfo.  Which says:-

LslGetProjectInfo
The LslGetProjectInfo function calls project information.

external "C" BOOL WINAPI LslGetProjectInfo(void* pRetData0);

Parameters

pRetData0 [Out] Pointer to a PrjHeader structure (length 256 bytes) with the following format:
Offset       Type                    Description
0               Unsigned long     Project checksum
4               Unsigned long     Number of active module
8               Unsigned long     (for internal use only)
12             Char [64]              Project name
76             Char [180]            Reserved

Return value

If no error occurs, LslGetProjectInfo returns TRUE. Otherwise it returns false. To query extended error information, call GetLastError.

Example:

struct PrjHeader {
unsigned long Prjchk;
unsigned long ModEnabled;
unsigned long Res1;
char PrjName[64];
char Res2[180];
} Ph;

if ( LslGetProjectInfo( (void *)&Ph ) == FALSE )
printf( "Error in LslGetProjectInfon" );
else
{
printf( "LslGetProjectInfo: Check CheckSUM : 0x%08lxn",
Ph.Prjchk );
printf( "LslGetProjectInfo: Modules enabled : 0x%08lxn",
Ph.ModEnabled );
printf( "LslGetProjectInfo: Project name : %sn",
Ph.PrjName );

To clarify the example is from the documentation.  I just need a way to get the project checksum which doesn't give me lots of squiggly red lines.

now I seem to be completely out of my depth because i cant get this to work (although this is only my 3rd day of C#)

Any advice would be gratefully recieved
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Sorry to clarify the example is from the documentation.  I just need a way to get the project checksum which doesn’t give me lots of squiggly red lines.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    The example appears to be C++, not C#, that is why you get lots of errors.
    84,580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: