|
All I can suggest is that you build libjpeg for debug (i.e. include debug information), link your application to the debug library and step through jpeg_write_scanlines and find which line causes the access violation. You can then look at the variables associated with that line and see which pointer looks suspicious (NULL, probably!).
The other thing to try would be to verify that jsmpArray has been allocated correctly and that DibToSamps has completed successfully.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
I would appreciate it if you help me in making a code for the UDP Ping by using C or C++.
|
|
|
|
|
ping doesn't use UDP - it's at the IP level (strictly, it uses ICMP), which is lower (closer to hardware) than UDP. See this[^] for full (very full) details.
[edit]Ah - I see what a UDP ping is - it's an effort to ping when ICMP is blocked. Look for "nmap source code" to find source for an application that will do a UDP ping. I'll give no more details than that because I'm not sure that UDP ping isn't evil.[/edit]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
modified on Wednesday, March 4, 2009 12:28 PM
|
|
|
|
|
|
FISH786 wrote: fopen_s
That's Microsoft's 'safe' version of fopen. The C standard (and any self-respecting Unix resource) will still tell you to use fopen. It's up to you.
FISH786 wrote: My question is short of going through the headear files, can someone recommend a good book or has a good documentation or a link that he/she is willing to share for the different functions.
How about the MSDN page listing all the C runtime's functions[^]?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I guess, I could supress some of the warning in my header file. On the other hand that might be a bad idea too.
I am sorry but I will be dumb and ask this short of but might be worth the effort in trying to get familliar with Visual Studio options. Is there a way I could have supressed that from the IDE environment setting?
Any sugetions? ..thanks a million for the link though.
|
|
|
|
|
FISH786 wrote: Is there a way I could have supressed that from the IDE environment setting?
Not quite - you need to put stuff in your source files - see this page[^] for details.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thank you that was great.
|
|
|
|
|
I'm trying to insert headers to a CListCtrl.
m_cList.InsertColumn(0, "Heading 1",LVCFMT_LEFT, 100);
m_cList.InsertColumn(1, "Heading 2",LVCFMT_LEFT, 120);
Doesn't work. What do I miss here?
|
|
|
|
|
Did you specify the "Report" style for the control?
|
|
|
|
|
I do not see any property like that in the property window. How do I set it?
|
|
|
|
|
It's the 'View' property - set the 'View' property to 'Report'.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Just found it right on time, thus saving myself from saying yet another thanks to you.
|
|
|
|
|
He is no different. Just looked at his profile.
|
|
|
|
|
Okay got it thanks. It's in "view" property.
|
|
|
|
|
How do you route message to a view?
I have a CFormView. I want to handle menu events in my View. But my CFrameWnd is actually capturing the events of the Frame level. For example, I want to handle Window-maximize event from my CFormView. Or if there's a way I can route the message from CFrameWnd to CFormView, it'll be great. Any idea?
|
|
|
|
|
grassrootkit wrote: I want to handle menu events in my View. But my CFrameWnd is actually capturing the events of the Frame level
Only if you have relevant handlers in your frame?
I have a vanilla SDI app. I've just added a handler for ID_FILE_OPEN to the view class. It caught the relevant message.
For the maximize event, you will have to explicitly route the message. Add the following handler to your frame class and your view should get visibility of maximize events.
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
GetActiveView()->SendMessage(WM_SYSCOMMAND, nID, lParam);
CFrameWndEx::OnSysCommand(nID, lParam);
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Also Stuart, how do we access the Document from a Dialog that I added through "insert new dialog" in resource option?
|
|
|
|
|
Well, you would need to tell the dialog about the document. You could add a CDocument* member variable to the dialog and set it before you call DoModal .
Alternatively (and I prefer this one), just pass the relevant attributes of the document to the dialog, so the dialog doesn't need to know about the document - letting the dialog have visibility of the document class upsets my aesthetic sense.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi to all again,
Here is an another doubt of mine.
while creting an mfc application it ask "how would you like to use the mfc library" .And the options are
1. as a shared dll
2. as a static linked library
What does this actually means?What is the difference?Is there any relation between this option the exe size.
Thanks in advance
I am a beginner
|
|
|
|
|
It specifies how you will link to the MFC libraries:
- static linking, in which case, all the required MFC functionalities are imported into your application. Which makes the exe size larger.
- dynamic linking (dll), in which case you use a MFC dll which makes your exe size much smaller. The draw back is that you need to distribute the MFC dlls along your application (if they are not present on the target machine).
|
|
|
|
|
(probably bad explanation, I'm still not fully awake)
1. Will use the shared MFC dll : meaning that if you have 2 different MFC applications with this setting, they share the MFC code in the DLL; meaning the MFC code is NOT included INSIDE your application, making it size smaller. There are potential issues if there are different versions
of MFC dll installed (or not) on the target machines (refer to DLL hell), most of the time you will need to ship your application with the "redistributable" (sp?) DLLs, makeing the installation packages bigger.
2. static linked : ill include the MFC code INSIDE your application, making it fully independant and stand-alone, and should run on target machines without MFC installed; this will make the application bigger, but will remove most (if not all) external dependancies, and limit DLL hell.
This signature was proudly tested on animals.
|
|
|
|
|
I think someone explained you few hours before.[^]
When you statically link it. (just like you link an MFC runtime) This gets added to your executable. You will not have a dependency but the executable size becomes bigger. When you link dynamically, the dll is kept independent and your exe uses it everytime and hence the advantage. Any number of exes can share the same dll.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I am using spread controller in my code.(i am using farpoint7.0)
I have spread data like
This is header one1
Type | col1 | col2
-----------------------------
GroupA | 35 | 38
AA | 12 | 11
Bb | 12 | 13
cc | 11 | 14
when user right click on header GroupA row also getting sorted.
i don’t want to sort first row always how to do it ..please help me out…
|
|
|
|