#include <cstdio>
#include <wtypes.h>

char * Encode(const char *);
typedef char * (*fn_t)(const char *);

int main(int argc, char** argv) {
    const char *pswd = argv[1];

    HINSTANCE hDLL;
    fn_t fn;

    hDLL = LoadLibrary("./Dogskin.dll");
    if(hDLL == NULL) {
        printf("can not find ./Dogskin.dll\n");
    } else {
        fn = (fn_t)GetProcAddress(hDLL,"Encode");
        if (fn == NULL) {
            printf("can not load Encode function\n");
        } else {
            const char* result = fn(pswd);
            printf("%s", result);
        }
    }
    return 0;
}
