Making DLL Parameter optional
Posted on 2006-07-22
I creating a "Wrapper DLL" in C++ that wraps around a Third Party API. I will then use VB to interface with the Wrapper so I can communicate with the API..
I have a function called "readGeneralAccountInfo". There is a corresponding function within the API that will allow me to pull back a large amount of info from a number of methods.
To keep my coding Simple in VB and easy to maintain in C++, I don't want to create a c++ method for every piece of information that can be pulled from the API readGeneralAccountInfo but rather make it a parameter that is passed into the Wrapper.
How do I make that parameter optional in c++ so when I call that method from VB, I don't have to pass in the parameter for a variable that I may not necessarily want to pull at that time...
Frm the ReadGeneralAccountInfo method, I can read account balance, account status, Account type. I want them all available in one method rather than 3 seperate methods, but if I have a list of accounts that I just need to pull the balance on, I don't want to have to declare and pass in vairables for all 3.