Board index » cppbuilder » BCB6: "code location" techniques
poojo hackma
![]() CBuilder Developer |
BCB6: "code location" techniques2006-03-31 11:21:05 PM cppbuilder4 Q: What could I use to determine if my application is being run from within our company? I've got a truly unique situation: Our IT department set us up 2 users for our FTP account. One user has read/write privileges and accesses our network through a local IP address (192.168.x.x); the other user has read-only access and *must* connect through a public IP address outside of our network. Currently, I have included an "#if define" routine to see if _DEBUG is defined. If it is, I assign the internal username, password and IP address; otherwise, I use the external values. Checking for _DEBUG works now, but it will not be good for us to test our final product on later. I have thought about checking for the existence of a file on my machine. If it exists, use internal values; else, use external values. The problem with this setup is that it would fail for the other developers here when they tried to modify the software. |