欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

iphone-common-codes-ccteam源代码 CCDylib.h

程序员文章站 2024-01-15 17:47:22
...
//  
// CCDylib.h
// CCFC
//
// Created by xichen on 11-12-23.
// Copyright 2011 ccteam. All rights reserved.
//

#import <Foundation/Foundation.h>

#define MOBILE_SUBSTRATE_PATH @"/Library/MobileSubstrate/DynamicLibraries/"

typedef void (*voidVoidFunc)();
typedef int (*intVoidFunc)();
typedef char * (*charStarVoidFunc)();
typedef NSString * (*nSStringVoidFunc)();

@interface CCDylib : NSObject
{
@private
void * _handle;
}

+ (void *)open:(NSString *)dylibFileFullPath;
+ (void *)openSystemDylib:(NSString *)dylibFileName;
+ (void *)openMobileSubstrateDylib:(NSString *)dylibFileName;

+ (int)close:(void *)dylibPtr;


- (id)initWithFileFullPath:(NSString *)fileFullPath;
- (id)initWithSystemDylib:(NSString *)dylibFileName;
- (id)initWithMobileSubstrateDylib:(NSString *)dylibFileName;
- (void)dealloc;

- (intVoidFunc)getIntVoidFunc:(NSString *)funcName;
- (voidVoidFunc)getVoidVoidFunc:(NSString *)funcName;
- (charStarVoidFunc)getCharStarVoidFunc:(NSString *)funcName;
- (nSStringVoidFunc)getNSStringVoidFunc:(NSString *)funcName;

- (NSString *)getError;

- (int)close;

@end

googlecode链接地址(会有更新):[url]http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCDylib.h[/url]
相关标签: iphone ios