s*****w 发帖数: 1527 | 1 want to implement this in c++,
user can choose different compression DLLs,
they can even come up with their own DLL,
now my code need to be genetic enough that it can handle all
these different compressions, based on the DLL user puts in the command line.
the similar compression APIs may have different number/order of arguments
for different DLLs.
How can i handle this ?
1000 thanks ! | a****l 发帖数: 8211 | 2 I don't think it is a good idea. think again if you really need to do in
this way. Surely you can do a program in this way, but most probably you
could come up with an easier way that does the same thing.
By the way, calling DLL has nothing to do with C++. Don't link every
question to C++. It also has nothing to do with C.
line.
【在 s*****w 的大作中提到】 : want to implement this in c++, : user can choose different compression DLLs, : they can even come up with their own DLL, : now my code need to be genetic enough that it can handle all : these different compressions, based on the DLL user puts in the command line. : the similar compression APIs may have different number/order of arguments : for different DLLs. : How can i handle this ? : 1000 thanks !
| k***r 发帖数: 4260 | 3 Your code can't be all generic. Just try to wrap
the differences in a file and expose a common interface
from that file.
command line.
【在 s*****w 的大作中提到】 : want to implement this in c++, : user can choose different compression DLLs, : they can even come up with their own DLL, : now my code need to be genetic enough that it can handle all : these different compressions, based on the DLL user puts in the command line. : the similar compression APIs may have different number/order of arguments : for different DLLs. : How can i handle this ? : 1000 thanks !
| p***m 发帖数: 387 | 4 #include
line.
【在 s*****w 的大作中提到】 : want to implement this in c++, : user can choose different compression DLLs, : they can even come up with their own DLL, : now my code need to be genetic enough that it can handle all : these different compressions, based on the DLL user puts in the command line. : the similar compression APIs may have different number/order of arguments : for different DLLs. : How can i handle this ? : 1000 thanks !
| t****n 发帖数: 324 | 5 right.
【在 p***m 的大作中提到】 : #include : : line.
| b***i 发帖数: 3043 | 6 为啥不能统一参数形式呢?
比如,都是用某个类的指针。
line.
【在 s*****w 的大作中提到】 : want to implement this in c++, : user can choose different compression DLLs, : they can even come up with their own DLL, : now my code need to be genetic enough that it can handle all : these different compressions, based on the DLL user puts in the command line. : the similar compression APIs may have different number/order of arguments : for different DLLs. : How can i handle this ? : 1000 thanks !
|
|