メインページ | アルファベット順一覧 | 構成 | ファイル一覧 | 構成メンバ | ファイルメンバ | 関連ページ

# dkcUnityArchivers.c

説明を見る。

    00001
    00010 #define DKUTIL_C_UNITY_ARCHIVERS
    00011
    00012 #include "dkcUnityArchivers.h"
    00013
    00014 #ifdef WIN32
    00015
    00016
    00017 DKC_UNITY_ARCHIVERS *WINAPI
    00018     dkcAllocUnityArchivers(const char *dllname,const char *function_prefix)
    00019 {
    00020
    00021     DKC_UNITY_ARCHIVERS *p = dkcAllocate(sizeof(DKC_UNITY_ARCHIVERS));
    00022     DKC_DLL *dp;
    00023     if(NULL==p){
    00024         return NULL;
    00025     }
    00026     dp = dkcLoadLibrary(dllname);
    00027     if(NULL==dp){
    00028         goto Error;
    00029     }
    00030     p->mDLL = dp;
    00031
    00032 Error:
    00033     dkcFree(&p);
    00034     return NULL;
    00035 }
    00036
    00037 int WINAPI dkcFreeUnityArchivers(DKC_UNITY_ARCHIVERS **pp){
    00038     DKC_UNITY_ARCHIVERS *p = *pp;
    00039     if(NULL==pp || NULL==p){
    00040         return edk_FAILED;
    00041     }
    00042     dkcUnloadLibrary(&(p->mDLL));
    00043     return dkcFree(&p);
    00044 }
    00045
    00046
    00047 int WINAPI dkcUnityArchiversDirectoryToArchive(DKC_UNITY_ARCHIVERS *p,const char *dir_or_file,const char *filename)
    00048 {
    00049     int r = edk_FAILED;
    00050     return r;
    00051 }
    00052
    00053 int WINAPI dkcUnityArchiversArchiveToDirectory(DKC_UNITY_ARCHIVERS *p,const char *filename,const char *dir_or_file)
    00054 {
    00055     int r = edk_FAILED;
    00056     return r;
    00057 }
    00058
    00059
    00060 #endif//end of WIN32
    00061
    00062 #ifdef _MSC_VER
    00063 #   pragma warning(disable:4055)
    00064 #endif
    00065
    00066 int WINAPI dkcUnityArchiversCommand(const char *dllname,const char *command_function_name,const char *command,
    00067                                                                         char *StringResultOutputBuffer,size_t output_size,int *archiver_result,HWND wnd)
    00068 {
    00069     DKC_DLL *dp = NULL;
    00070     DKC_UA_ARC_F_TYPE func = NULL;
    00071     int r = edk_FAILED;
    00072     dp = dkcLoadLibrary(dllname);
    00073     if(NULL==dp){
    00074         return r;
    00075     }
    00076     func = (DKC_UA_ARC_F_TYPE)dkcGetProcAddress(dp,command_function_name);
    00077     if(NULL==func){
    00078         goto Error;
    00079     }
    00080     r = func(NULL,command,StringResultOutputBuffer,output_size);
    00081     if(archiver_result){
    00082         *archiver_result = r;
    00083     }
    00084     if(0 != r){
    00085         r = edk_FAILED;
    00086         goto Error;
    00087     }
    00088     r = edk_SUCCEEDED;
    00089 Error:
    00090     dkcUnloadLibrary(&dp);
    00091     return r;
    00092 }
    00093
    00094
    00095
    00096
    00097 #ifdef _MSC_VER
    00098 #   pragma warning(default:4055)
    00099 #endif