thank you for keeping on helping an idiot like myself. 1) When I go to open the toolbox it says General, There are no usable controls in this group. Drag an item onto this text to add it to the toolbox. I don't see how you get to the extension manager 2) when I open the Anvil.ini file this is what i have [Trader] Id=BCEK Simulation=1 LoadOrders=0 Compression=0 CancelAllOnDisconnect=0 reuseaccountconnection=0 [StartupServer] Ip=10.25.54.193 Port=37018 [Executor] SameAsMarketData=1 Ip= Port=0 [SummaryServer] Ip=10.20.26.137 Port=37017 Connect=1 Delay=0 [MSServer] 99.99.99.99_99=0_FULL Market 99.99.99.99_99=0_Limited Market 99.99.99.99_99=0_CHINA DEMO [MarketDataServer] 99.99.99.99_99_Main SSL 99.99.99.99_99_DEMO ONLY 99.99.99.99_99_CHINA DEMO I'm not sure where I which tag is like ext Thanks again
You can do the following to have an extension automatically load into the application upon startup. Within the Anvil.ini file add the following to the bottom: [Extension] Path=C:\otbt\dll Make sure to put the DLL files that you want auto loaded into the path specified above.
[I copied exactly " [Extension] Path=C:\otbt\dll" into the file and ran. I still get the same error] I'm sorry about putting the path "C:\otbt\dll" in there. That is what I use. You'll want to change this path to where ever you place your dll. Maybe you should try to put your dll into the same directory where you have your Anvil.exe. I've also attached a document that contains the portion from the Anvil help document that talks about extensions.
If the error you are referring to is regarding the lack of debug information, this is just the compiler telling you that the copy of Anvil you are running wasn't compiled with debug information. It won't prevent you from loading or debugging your DLL. But make sure that if you compiled your DLL as a debug build that you are also using the debug build of Anvil, and vice-versa. This is extremely important if you're using MFC, as the debug and release libraries for MFC are different. Regarding the [Extension] tag, I would first make sure that you are able to load your DLL manually, per ctarmor-et's instructions. If that works for you, then you can simplify the loading process by adding the [Extension] tag to your .ini file.
Again I want to thank all for helping me out. I'm sorry for having such a problem with a simple part. This is what I'm doing so far with all the help. I have the example open AnvilTrader.cpp. I know you have to add an extension. I'm not sure exactly what this is an how to do this. 1) Is adding an extension just loading the .dll file that goes with the program? 2) or does it involve loading a .exe file @ as ctamor said you should load this file C:\Program Files\Assent LLC\Anvil 2.6.7.87\Anvil.exe When I compile the project it asks me to include a .exe file. I chose C:\Program Files\Assent LLC\Anvil 2.6.7.87\Anvil.exe. When I run I get a window that pops up and says No Debugging Information Debugging information for 'Anvil.exe' cannot be found or does not match. Binary was not built with debug information. I click yes and it seems to run, however there are no windows that pop up (like in the .rc file) So I I guess you have to load a .dll file. I'm not sure which one i'm assuming... ANVILTRADER.DLL, which is included in the project. So I run the project, and it asks me to enter my userid / password. From the advice from ootbt08, I do that then go to toolbar, and click on extensions I go to the toolbar and choose the icon for extensions click load and go to project file where AnvilTrader.dll is located and click that. I get a window popping up saying "the specified procedure could not be found" any clue as to what I'm doing wrong?
Without actually sitting in front of my development studio and walking through it myself, I can't tell you specifically what the problem is. You cannot debug a DLL without some executable loading it. That's why the development studio is asking you for an executable. Yes, you should choose the Anvil.exe executable. Again, the error saying that Anvil was compiled without debug information just means that you can't debug Anvil.exe itself. That's not a problem, but it might be indicative that you're using the release build of Anvil, not the debug build... ? You can get a debug build of Anvil from Assent. (You still won't be able to step into it, but you MUST use the debug build to debug an extension DLL that was compiled as a debug build!) Without the [Extensions] section in the .ini file, your DLL is only loaded when you load it manually. It sounds like you are loading the extension DLL correctly, but Anvil is unhappy... When you load AnvilTrader.dll (like you said, via the extensions in Anvil) are you loading the one in the Debug directory or the Release directory? I'm just speculating here, but loading the wrong one might cause a problem you're seeing. Try loading the other one and see if that works. Basically, Anvil is saying that it cannot find a specific function in that DLL that it wants to call. Again, speculation, but the procedure name mangling might be different between debug and release builds? Sorry I can't be of more help, but without actually running the development studio and stepping through it various ways, my memory just doesn't work well enough to remember those details. (I don't actually "know" anything, I'm just really good at trial and error. )
Thank you for that explanation, I think I might now have a better clue as what is going on. In that .dll file there are a list of functions that the program uses. I'm not really sure exactly what "debugging a .dll is" but I guess you need some .exe file to do that. You said I need the Anvil.exe that was a debug build and NOT a release build. I don't which one I have, but there is only 1. I'm assuming that because it's not working it might be the release build and not the debug build. I've looked in the API material but I do not see an Anvil.exe. Also, I've looked around where my one Anvil.exe and see no other Anvil.exe that could be a debug build. I guess I should email them for a copy of Anvil.exe (debug build)
You're welcome! Hopefully it helps. Right, the DLL contains a list of functions that get called by Anvil.exe. A DLL is simply a library of functions, not a program per se. So it can't "run" by itself, it needs to be called by some .exe file. So when you write an extension DLL, you are writing a bunch of functions that can get called by Anvil and extend the functionality. At some point you're going to want to debug what you've written, i.e. debug the DLL, and you have to do that while it's loaded into Anvil. And you'll want to build your DLL with debug settings so you can see what's going on. Not having the debug build of Anvil might explain why it's not working. If you load the extension DLL in the Release directory and it works, then that supports this idea. If you contact Assent, they can tell you where to get the debug build of Anvil.