|
class __declspec( dllexport ) ... for the DLL
class __declspec( dllimport ) ... for the App.
Further questions?
Don't try it, just do it!
|
|
|
|
|
hi
i made an active x controll that perform the function of rolling dice.
it works fine.now i want to add that on the webpage run on IE. for that purpose i had used the object tag. but my IE does not support that tag.
tell me how can i run my active x through web page.
<title>A Web page with a rolling die
<object id="Dieroll1"
classid="CLSID:46646B43-EA16-11CF-870C-00201801DDD6"
codebase="dieroll.cab#Version=1,0,0,1"
width="200"
height="200">
<param name="ForeColor" value="0" />
<param name="BackColor" value="16777215" />
If you see this text, your browser does not support the OBJECT tag.
Here is some text after the die
tell me how to add active x on web page.
ddd
|
|
|
|
|
Hi,
a user-reported crash minidump reports that the crash happened because EIP was set to 00000000.
Unfortunately, the call stack trace of the bad thread only shows the "00000000()" address in Visual Studio .NET.
Anyone have an idea how I could get more information from the minidump to find out the reason for the crash ?
Thanks,
Manfred
|
|
|
|
|
The dword at the top of the stack can help. It shows you where the call to 00000000 came from.
Don't try it, just do it!
|
|
|
|
|
Sometimes, not always. If the stack pointer was "corrupted" for example by invalid calling convention for example, the function could have returned to this location. The return value could also have been overwritten, so top of stack is a good starting place but you may need to check down the stack to perhaps try to realign the stack to figure out what really happened and if the stack pointer is correct or not and then piece back what happened.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
So, for example the reasons that EIP could be zero (These can also apply to other invalid addresses, however for non-zero invalid addresses there are actually a few more things to look at such as DLLs being unloaded but still on the stack executing).
1. Function Call using a NULL function pointer.
DDS ESP should provide you the return address at the top of the stack of the caller.
2. Invalid calling convention or other mis-operation that would dis-align the stack.
What you could do then is
DDS ESP - xx to dump the stack to find out what the "real" return address was supposed to be. From this you can deduct what the original function call was. Then you can go through that function, find the "RET" and see how many bytes would have been removed. Find the "0" on the stack by deducting this from the current ESP to find out if this is a possible return value match.
Then you can either debug that function, watching the calls and ESP to see where it changes. After each call the ESP should be adjusted to before the parameters on the stack, either immediately upon return or shortly after.
3. Corruption of the stack.
These are a bit tougher. You should dump the stack and attempt to piece together a function call graph using whatever return addresses are still on the stack.
You can check the TEB of the thread to find the top and bottom of the stack so you can also verify if ESP is in the valid range as well. You could then dump the entire stack and find around the area of the problem what return addresses weren't overwritten. Look for data on the stack, for example if you have any arrays hopefully they were strings! If they were you can dump the bytes of the stack and hopefully easily figure out what function had the string that overwrote the return address.
Hopefully one of these methods can help pin point the problem.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
is there anyway to learn which dll files does my program need to run. Or which merge modules to add.
|
|
|
|
|
To see the dependencies of your programs, use the Dependency Walker tool (depends.exe).
To get more info on merge modules and setups in general, try this site:www.installsite.org
Hope this helps
|
|
|
|
|
Hello Everyone,
I am creating a basic WebBrowser type of application.
One of our requirement is to allow drag-drop of images (placed in a layer)
withing the HTML page.
To intercept the dragging events , I overrided OnGetDropTarget() and
provided my own CCustromDropTarget (derived from IDropTarget) class's
object.
Doing so, i am able to receive all the dragging events occuring while user
is dragging image/text etc in the view.
However I am stuck with the following :
1) When the content dragged is an Image (CF_DIB), How do I extract HBITMAP
from the IDataObject passed to DragEnter()
2) Although the content dragged is an image, but thats the represantation of
a particular type of object used in our application.
hence when the image is dragged I want to transfer some more data in this
IDataObject than just the image. Lets say I want to pass actual IHTMLElement
which is being dragged. How Do I achieve that ?
My best guess for the 2nd question was to handle FilterDataObject() and
provide a new IDataObject which has the extra information required in our
application.
Unfortunately this function is never getting called. Can someone please
throw light on FilterDataObject() as well.
Best Regards,
Abhishek Narula
Abhishek Narula
|
|
|
|
|
HRESULT CHtmlCtrl::OnFilterDataObject(IDataObject * pDataObject, IDataObject ** ppDataObject)//filter all except CF_TEXT
{
COleDataObject OleDataObject;
OleDataObject.Attach(pDataObject,FALSE);
COleDataSource* pOleDataSource=new COleDataSource;
if(OleDataObject.IsDataAvailable(CF_TEXT)){
// Get text data from ColeDataObject.
HGLOBAL hGlobal=OleDataObject.GetGlobalData(CF_TEXT);
pOleDataSource->CacheGlobalData(CF_TEXT,hGlobal); }
REFIID riid=IID_IDataObject;
pOleDataSource->ExternalQueryInterface(&riid,(LPVOID*)ppDataObject);
OleDataObject.Detach();
return S_OK;
}
You may get more information if you find the clipboard containes data in CF_HTML or CF_DIB format.
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
First of all, thank you very much for replying to the post.
Let me re-iterate on the question,
In the Very first place, OnFilterDataObject is not getting called. (btw I am using CHTMLView)
Moreover the contents are in CF_DIB format (this i extracted from IDataObject passed in OnDragEnter()) Now my question is how to construct HBITMAP from the data available in CF_DIB format.
Thanks again,
Abhishek Narula
|
|
|
|
|
sorry, FilterDataObject seems only works for copy/paste
try this to prevent the DHTML DOM from handling drag events:
also check if other elements handle these events in scripts. you can either modify these attributes through source code or through DHTML DOM.
you also can override CView::OnDrop to handle dropped data, or CHTMLView::OnGetDropTarget to change the drag/drop behavairs.
for more information about DIB and DDB, check the "copy/paste an image" section of
[^]
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
how to Ensure my program works across platforms? namely, win98se and winxp?
i know one way to do is to simply test them across, but is there a better way?
i work on my program at home using winxp and go down to my office (with win 98se) once a week to test my work
since win98se is an older platform, the stuff i work on winxp might not always work on win98se
some stuff i know:
- when putting in new functions, check the function documentation to see if it works on the platform
- if function doesnt work, try a work around using other functions
does vc++6.0 SP6 have a "check across platform" function in it?
OR if not, is that a program/plugin (preferbly free because i am not paid for my work) that checks whether my code works on win98se and hopefully report the snippets of codes that doesnt work or the extra stuff that needs to be installed before it works? because i dont wanna go down to my office to find that whatever worked at home doesnt work in the office.
intead of doing tests on the exe file.......
i believe that the best way is to have a program that scans the source code for functions that dont work with win98 OR win95 (as specified by the programmer) and report them
is there a program that does this?
|
|
|
|
|
Check MSDN, for every API there is a table on which operating system it will work.
Don't try it, just do it!
|
|
|
|
|
Depending on how long you're working on the project, you could try:
Microsoft Virtual PC 2004 45-Day Free Trial Edition and install Win98 on a virtual machine.
I also thought of Windows Application Compatibility Toolkit, but it doesn't seem to support Win98. I'm wondering if there's an older version of it kicking around somewhere that does.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
dont u guys think that a program that checks the plain text source code (not the exe file) for compatibility is way overdued?
|
|
|
|
|
It's next to impossible to write one, except for trivial programs. I'm sure you'd agree that every non-trivial application uses the CRT or third party libraries, how'll you do source code analysis for those?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
It could be possible and useful; there are many static code analsys tools. In the least they could point out what functions are not supported on which platforms. Some behavior and interactions may not be able to be caught but something is better than nothing. I wouldn't use it as a replacement for testing however it could help to catch as you say "trivial" bugs without having to continously look every function you use up in MSDN or test every system only to recompile to test again.
Have you used Pre-Fast? Have you heard of Poly-Space Verifier?
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
How to print the file from visual c++ program via Dos-Prompt.I used System() command but it is not printed.How it is possible.Please help me.
Sunsen
|
|
|
|
|
TYPE filename >> LPT1 used to work, but I'm not sure whether it still does. The DOS support in Windows is minimal these days... Why not just open it in Visual Studio and print it? Ctrl-P still works...
"...putting all your eggs in one basket along with your bowling ball and gym clothes only gets you scrambled eggs and an extra laundry day... " - Jeffry J. Brickley
|
|
|
|
|
You may want to try calling SHFileOperation() (use the "print " action) from your console app. You'll need to link with shlwapi.lib (and possibly other libs).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
How to monitor the folder in the MFC.Suppose the new file is come to that folder ,it indicate the file name.Please Urgent .Help me
Sunsen
|
|
|
|
|
sunsen wrote:
How to monitor the folder in the MFC
This Api Will Help :- ReadDirectoryChangesW
Here is an Article, that might help you :-
http://www.codeproject.com/file/directorychangewatcher.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
There's also FindFirstChangeNotification() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Okay, I don’t get it. Perhaps someone can help me out a little. I set up a client / server over Winsock no problems. But once a client receives the data from the server what’s the best way of storing that information for later use?
Here is an example of the type of data I'm receiving at the client end
WorkOrder | Date | SiteNumber | SiteContact | SitePhone | Device | Summary | Comments
00001 | 07/09/05 | 0001 | Joe | 111-111-1111 | 1 | Test | Test
00002 | 07/10/05 | 0001 | Jane | 111-111-1111 | 0 | Test2 | Test2
Etc
The number of rows is variable (depending on how many service calls exist). I started using a simple pointer to a struct. But that “feels” messy, is there a better way? I know there are several different types of single dimension arrays in C++, but I have yet to find a multi-dimensional array.
Any pointers anyone? Hope My post was clear. Thank you for you time and consideration.
-------------------------------
|
|
|
|