I received a suggestion from another forum to look at InternetSetCookie() et al.. looks good so far. fyi. sas
sas2222
Posts
-
create cookie file on client -
create client side cookie from .exe (atl code)thanks. I'll take a peak now [cookie newbie). sas
-
create client side cookie from .exe (atl code)Hello, I am interested in creating a standard cookie file from a .exe application, that will later be consumed by a intranet application via the ie browser. (I'd like to be able to generate client side cookie files without without actually running the ie browser). is this possible from a client side only app (.exe)? any help is appreciated. sas
-
create cookie file on clientHello, I am interested in creating a standard cookie file from a .exe application, that will later be consumed by a intranet application via the ie browser. (I'd like to be able to generate client side cookie files without without actually running the ie browser). is this possible from a client side only app (.exe)? any help is appreciated. sas
-
Explorer Selected File - how to retrieve from ToolBar (ToolBand)thank you; that code worked; it took me a little bit to get the right hWnd, but once I did, I was able to read the selected files.. thanks again. sas
-
Explorer Selected File - how to retrieve from ToolBar (ToolBand)thanks. I am using win XP. I tried code like this, per your help, but the app crashes at the SHShellFolderView_Message line: LPITEMIDLIST* ppidl; LRESULT numItems = (LPARAM)SHShellFolderView_Message(m_hExplorerHwnd, SFVM_GETSELECTEDOBJECTS, (LPARAM)ppidl); is there something I'm missing, do I need to instantiate the array of pidls? m_hExplorerHwnd is the hwnd of the actual explorer.exe gui any help is appreciated. sas
-
Explorer Selected File - how to retrieve from ToolBar (ToolBand)hello. Does anybody now how to retrieve the currently selected (highlighted) filename as shown in the windows explorer window from a toolbar that is implemented with the TOOL / Desk Band interfaces? -- When I click on a custom toolbar button, I need to know the name of the selected file in order to "operate" on that file.. Any help is appreciated! sas
-
query reg STL mapsmy cut and paste of the map declaration is getting altered somehow; the angle brackets and template parameters are getting stripped out.. wierd.. try paranthesis for visual sake typedef map(int, One) Map sas
-
query reg STL mapsmy first posting had a cut and paste error in it; the map declaration should look like: typedef map Map; -- sas
-
query reg STL mapsi had a little time to delve into this, so here you go: It appears that your map declaration is incomplete: typedef map Map should look like: typedef map Map stl maps are templated classes, meaning at declartion time the coder needs to tell the map what is being stored in the map, in this case, an integer and a One object are being stored in the map. -- your One class should have the age and salary members public (for the quicky example); I changed your One class to look like class One { public: One() {age = -1; sal = -1;}; //ctor int age; // these could be private wwith public accessors.. int sal; protected: private: }; -- also in your while loop, you should instantiate a new One object (either on the heap with 'new' or on the stack like below): when assigning the int and the One object to the map, stl will use the One object's copy constructor to make a copy of the object to store in the map; while(!file.eof()) { One newOne; // create new Oneobject on the stack newOne.age = 50; newOne.sal = 1000; theMap.insert(Map::value_type(index, newOne)); index++; } -------- when printing out your map, your code as written assumes the One class has an overloaded operator <<; you can also print the indiviudals members like so (note the accessing of the One object's members): cout << endl << "The class "<< (*theIterator).first; cout << endl << "The class "<< ((*theIterator).second).age << " | " << ((*theIterator).second).sal << endl ; -- here's a cut and paste of my changes to your example: i compile it but did not execute it, btw... class One { public: One() {age = -1; sal = -1;}; //ctor init of members int age; int sal; protected: private: }; typedef map Map; int main() { Map theMap; Map::iterator theIterator; //Open the file //Read each line of file and store in class variables int index = 0; while(!file.eof()) { One newOne; newOne.age =50; newOne.sal = 1000; theMap.insert(Map::value_type(index, newOne)); index++; } //to get the class theIterator = theMap.find(0); //Get the entire first record ?How should I achieve this which is stored in a class? cout << endl << "The class "<< (*theIterator).first; cout << endl << "The class "<< ((*theIterator).second).age << " | " << ((*theIterator).second).sal << endl ; return 0; } sas
-
Automating Officeand try this link to microsoft's docs... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrMicrosoftPowerPoint2000.asp sas
-
Automating OfficeYou can use the "OLE/COM Object Viewer" accessible from the Studio .net Tools menu. open up the tool from the "Tools | OLE/COM Object Viewer" menu selection and browse to the Microsoft Powerpoint x.xObject Library in the left hand tree view. the right hand pane should fill up with registration information. doiuble click in the left hand treeview on the power point text and it will open the type library definition (methods, etc..) for the ppt object model. - you can also run Powerpoint and select Tools | Macro | Visual Basic Editor to bring up VBA editor (you must have a presentation open, btw). Then press F2 key to run the object browser which shows all the methods for the powerpoint library and other referenced libraries. -- hope this help.. steve sas
-
shell programmingthanks again for the help. I'm trying to persist instations of native contructs (like stl maps) and a straight C++ class instantations across different "instances" of explorer.exe. by "instances" of explorer.exe I mean invocations from the start menu (looking in the task manager process table; there is only one explorer.exe process however). from what i understand, IShellExtInit releated coclass gets created every time the user right clicks on a file name (bringing up the context menu). I want these instances of the coclass to be able to access my instantiations of my straight C++ class that lives at the app level (CWinApp dervied class). i'm pretty sure my problem is memory related; -- is there a good description on how the shell works when executing a new isntance of the explorer? It appearsthat the Esposito Shell programming book is out of print; this book probably has good info in it. -- any info is further appreciated. sas
-
Calling COM from DLLin the event you have moved from vc++ 6.0 to vc++ .net studio: ---------------------------------------------------------------- I recently had this problem when going from vc++ 6.o to vc++ .net I had to move my include directories around (as the other poster suggested); I solved it by putting the platform sdk inclused before the vc includes. $(VCInstallDir)PlatformSDK\include $(VCInstallDir)include It really has to do with the macros that are defined in the include files. see MS knowledge base article "PRB: Error C2787 When Building a Project Using ATL 3.0" sas
-
shell programmingthanks for the reply. THe IshellExitInit initialize method is called each time the file's context menu is displayed; At the very least, I need to to persist certain data in memory across context menu invocations (which works, btw). best case scenario is when I can persist data in memory across invocations of the explorer.exe (which I can't get working yet) Has anyone had experience with doing the above, short of serializing and deserializing at every menu IshellExitInit::initialize call? sas
-
What a sh##t!!!at a quick glance, the error 0x000045a - "A dynamic link library (DLL) initialization routine failed" is probably caused by differences in a DLL's version (methods, behaviour) between win98 and win2000. When compiling on win2000, the compile initialization routines may be calling entry points that are not in the older win98 version of the DLL in question. You may want to create an installation program (setup.exe) with a tool (like installshield or wise or whatever) when moving from a newer OS to an older OS. these install programs identify the required versions of the needed dlls and prompts you to install them during running og the setup.exe program. hope this helps at least a little bit. sas
-
shell programmingwhat is the preferred way to share instantiations between different "instances" of the explorer shell (explorer.exe)? I have read the Dunn articles on shell programming and can't seem to share object instantiations between explorer.exe "instances". I have a ATL created shell extension that implements the context menu interfaces and in a single instance of the explorer, the code works fine; If i fire up a second instance of explorer.exe from the start task bar, and right click on a file, the code crashes, and the debugger takes me to the windows malloc.c src file. my memory model is such that I keep instantiated objects in the main application object (derived from public CWinApp), and want to use these objects from the new instances of the coclass that implements the IShellExtInit interfaces. I have used the SHGetMalloc call to get an IMalloc interface and use that for my mallocs. one of the objects is a iDispatch class generated from a typlib via the class wizard.. other classes are straight C++ impl classes that hold session data. -- Any help is appreciated! - steves sas