custom DSN handling

custom DSN handling for C and C++