API_ENTRY
lc_checkout(
LM_HANDLE_PTR job, /* Current license job */
const LM_CHAR_PTR feature, /* The feature to be checked in */
const LM_CHAR_PTR version, /* Feature's version */
int nlic, /* Number of licenses to checkout */
int flag, /* Checkout flag */
const VENDORCODE_PTR key, /* The vendor's key */
int dup_group) /* Duplicate license grouping criteria */
{
我尝试着按楼主的方法编译lmcrypt.c
遇到一下困难,请楼主帮助:
1)我按照下面的lm_code.h修改,但是发现没有地方需要我们回收的加密种子SEED1,SEED2
代码如下:
----->code begin here<------------
/******************************************************************************
*
* Module: $Id: blank_lm_code.h,v 1.15 2002/01/12 02:32:42 daniel Exp $
*
* COPYRIGHT (c) 1990, 2002 by Globetrotter Software Inc.
* This software has been provided pursuant to a License Agreement
* containing restrictions on its use. This software contains
* valuable trade secrets and proprietary information of
* Globetrotter Software Inc and is protected by law. It may
* not be copied or distributed in any form or medium, disclosed
* to third parties, reverse engineered or used in any manner not
* provided for in said License Agreement except with the prior
* written authorization from Globetrotter Software Inc.
******************************************************************************
*
* Description: Used to generate lm_new.o/.obj and by license-
* generators.
*
* Once the kit is "built" (using make or nmake) this file is no longer
* needed, but should be stored somewhere safe.
*
* Set the following values:
* VENDOR_KEY1-5 Provided by Globetrotter.
* VENDOR_NAME If not evaluating, set to vendor name.
* LM_SEED1-3 Make up 3 32-bit numbers, (or use
* 'lmrand1 -seed' to make up), keep secret, safe,
* and never change.
* CRO_KEY1-2 Provided by Globetrotter if CRO used.
* LM_STRENGTH: If using CRO, set to desired length
*
* Upgrading: from version older than 8.1: Copy your
* ENCRYPTION_SEEDs from the old lm_code.h file.
* Make sure LM_STRENGTH matches, if you were
* using LM_STRENGTH
*/
#ifndef LM_CODE_H
#define LM_CODE_H
#include "lm_cro.h"
/*
* Vendor keys: Enter keys received from Globetrotter.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/
#define VENDOR_KEY1 0x0a731218
#define VENDOR_KEY2 0x93251a86
#define VENDOR_KEY3 0x6b9c9118
#define VENDOR_KEY4 0xa19e9a41
#define VENDOR_KEY5 0x0b165dca
/*
* Vendor name. Leave "demo" if evaluating. Otherwise,
* set to your vendor daemon name.
*/
#define VENDOR_NAME "demo"
/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up
*/
define LM_SEED1 0x12345678
define LM_SEED2 0x87654321
define LM_SEED3 0xabcdef01
/*
* Pick an LM_STRENGTH:
*/
#define LM_STRENGTH LM_STRENGTH_DEFAULT
/*
* If you're not using CRO, leave this as
* LM_STRENGTH_DEFAULT. If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
* -----------------------------------------------
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* CRO:
* LM_STRENGTH_113BIT, LOW: sign length= 58 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key
*/
/*
* CRO Keys: Provided by Globetrotter if CRO used
* Turned off by default. Be sure to set
* LM_STRENGTH above if CRO_KEYs are non-zero
*/
define CRO_KEY1 0x50fe9863
define CRO_KEY2 0xeaa013fd
include "lm_code2.h"
#endif /* LM_CODE_H */
----->code end here<------------
请楼主贴出您的lm_code.h,就是根据你上面资料填写后用于编译的文件,以便我这菜鸟学习
5)键入:build.bat编译:
提示lm_code.h第92行出错,即:
include "lm_code2.h"出错
我修改为
#include "lm_code.h"
则此处不再出错,但不知道是否我改的对不对
提示:lmcode.c第6,11出错:
lmcode.c内容如下:
---------->开始<--------------
#include <stdio.h>
#include "lmclient.h"
#include "lm_code.h"
VENDORCODE vendorkeys[] = { /* Possible keys for vendor daemons */
{ VENDORCODE_5,
ENCRYPTION_SEED1^VENDOR_KEY5, ENCRYPTION_SEED2^VENDOR_KEY5,
VENDOR_KEY1, VENDOR_KEY2, VENDOR_KEY3, VENDOR_KEY4,
FLEXLM_VERSION, FLEXLM_REVISION, FLEXLM_PATCH,
LM_BEHAVIOR_CURRENT, 0, 0 },
}; /* End of vendor codes*/
int keysize = sizeof(vendorkeys)/sizeof(vendorkeys[0]);
#ifdef VMS
#endif
#ifdef OS2
#endif
char *vendor_name = VENDOR_NAME;
------------->结束<----------------
出错提示如下:
C:\Program Files\flexlm\v7.0\i86_n3>echo off
***************************************************************************
Build.bat can be used in 3 ways *
build MT - This builds all of the files using the /MT compiler flag *
( Multi-threaded C Runtime as a static library ) *
build MD - This builds all of the files using the /MD compiler flag *
( Multi-threaded C Runtime as a static library ) *
build DLL - This build all of the files to use the flexlm dll *
***************************************************************************
Building using the /MT flag
lmrand1 -i ../machind/lsvendor.c
cl /c /nologo /c /O1 /I../machind /MT -I../h lmcode.c
lmcode.c
lmcode.c(6) : error C2065: 'ENCRYPTION_SEED1' : undeclared identifier
lmcode.c(6) : error C2059: syntax error : 'bad suffix on number'
lmcode.c(6) : error C2099: initializer is not a constant
lmcode.c(6) : error C2061: syntax error : identifier 'x737478f7'
lmcode.c(6) : error C2059: syntax error : 'bad suffix on number'
lmcode.c(11) : warning C4034: sizeof returns 0
C:\Program Files\FLEXlm\v9.2\i86_n3>echo off
***************************************************************************
Build.bat can be used in 3 ways *
build MT - This builds all of the files using the /MT compiler flag *
( Multi-threaded C Runtime as a static library ) *
build MD - This builds all of the files using the /MD compiler flag *
( Multi-threaded C Runtime as a static library ) *
build DLL - This build all of the files to use the flexlm dll *
***************************************************************************
Building using the /MT flag
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
lmrand1 -i ..\machind\lsvendor.c
cl /c /nologo /c /I..\machind /I. /MT -I../h lmcode.c
lmcode.c
lmcode.c(22) : error C2065: 'LM_SEED1' : undeclared identifier
lmcode.c(22) : error C2099: initializer is not a constant
lmcode.c(23) : error C2065: 'LM_SEED2' : undeclared identifier
lmcode.c(23) : error C2099: initializer is not a constant
lmcode.c(24) : error C2065: 'LM_SEED3' : undeclared identifier
lmcode.c(24) : error C2099: initializer is not a constant
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
C:\Program Files\FLEXlm\v9.2\i86_n3>
最初由 wxd 发布 C:\Program Files\FLEXlm\v9.2\i86_n3>echo off *************************************************************************** Build.bat can be used in 3 ways * build MT - This builds all of the files using the /MT compiler flag * ( Multi-threaded C Runtime as a static library ) * ........