|
you will have to handle the onhscroll and on vscroll notification and scroll the window urself
|
|
|
|
|
What is prefered base address with respect to dlls? If any one can provide a link for its description i will be helpfull...
Regards,
Prakash.
My God is more powerfull Than Your God.
|
|
|
|
|
There is no single preferred base.
Ideally the base+size of any given dll is separate from any other dll that an application will load, so that the dll does not need to be rebased or fixed up at run time.
See :
#pragma comment(linker, "/BASE:" ...)
I generally use the text file form to set the bases for all my dll's.
Note : The file must be in the LIB path somewhere.
...cmk
Rosencrantz: I don't believe in it anyway.
Guildenstern: What
Rosencrantz: England
Guildenstern: Just a conspiracy of cartographers then.
Save the whales - collect the whole set
|
|
|
|
|
Thanx for answerting my question, but do you have any webpage how dlls work during runtime.
My God is more powerfull Than Your God.
|
|
|
|
|
Mr.Prakash wrote:
how dlls work during runtime
That is a large topic. I don't know of a 'single' webpage that has all the answers. Is there a specific question you have ?
...cmk
Rosencrantz: I don't believe in it anyway.
Guildenstern: What
Rosencrantz: England
Guildenstern: Just a conspiracy of cartographers then.
Save the whales - collect the whole set
|
|
|
|
|
I would like to know the core working process of loading the dll in to the memory. Just like in dos days we know how the exe or the com files are loaded and executed.similarly can i have some information about dlls?
My God is more powerfull Than Your God.
|
|
|
|
|
Mr.Prakash wrote:
I would like to know the core working process of loading the dll in to the memory.
Wow. That's at least a chapter in a book.
Try the following books :
- Debugging Application, John Robbins, Microsoft Press
- Advanced Windows, Jeffrey Richter, Microsoft Press
...cmk
Rosencrantz: I don't believe in it anyway.
Guildenstern: What
Rosencrantz: England
Guildenstern: Just a conspiracy of cartographers then.
Save the whales - collect the whole set
|
|
|
|
|
How about MSDN?
Click Technical Articals
Click Rebasing Win32 Dlls
Thank You
Bo Hunter
|
|
|
|
|
Thanx all, my intension is to know the process of loading of a dll. I dont think its going to be usefull directly while programing, but understanding its concept may be usefull in the future under unknown circumstances.
My God is more powerfull Than Your God.
|
|
|
|
|
I've been having a problem, that I can't quite figure it out. Here is the layout of the file. There is an extern unsigned char data[6 * 1024 *1024] in a header file I have. When the data is loaded into the variable, the bytes are swapped. I am trying to use the _swab function, but to no use. I've defined a variable, char rData[6 * 1024 * 1024], local to a function I have. The _swab function looks like this:
_swab((char *)data, rData, sizeof(datasize));
*datasize is the acutal number of bytes that were written to the data.
This should work, I think. But instead, the program hangs, and creates an exception that ends the program.
Any help is WIDELY appreciated. Thankx.
Chris
|
|
|
|
|
Elfuzzbo! wrote:
I've defined a variable, char rData[6 * 1024 * 1024], local to a function I have.
That will likely blow your stack.
Ummm, what exactly do you want to swap ?
Usually you swap short, long, float, double that were written in one endian format and are being read in another.
You are just talking about a massive char array. What does the char array represent ?, if it's just char then swapping is likely not what you want to do.
...cmk
Rosencrantz: I don't believe in it anyway.
Guildenstern: What
Rosencrantz: England
Guildenstern: Just a conspiracy of cartographers then.
Save the whales - collect the whole set
|
|
|
|
|
i have a couple of quick questions on MFC-based MDI apps, that hopefully you can help me out with. i'm looking over some books, but none of them have the answers. maybe they're too basic... but i can't figure out for the life of me. and there aren't that many win32 programmers around me, and ones who do don't know it either.
anyway, 3 questions:
1. from my CMainFrame (derived from CMDIFrameWnd), how do i traverse through each existing (open) CDocument? i know i can go through MDINext() to retrieve each view, and then call GetDocument() on each view. but MDINext() also activates the view, which i don't want. i want to do it in the background, send a message or call a function on the CDocument objects. how?
2. how do i make CMainFrame create a new CDocument/CView in code? i know it starts from CWndApp::OnFileNew, but what exactly do i want write in code? for instance,
CMainFrame::OnMakeNewView()
{
// what do i write in here?
}
3. how do i create a new CView on the same CDocument in code? i can goto the menu and select 'Window->New Window', and that will create a new view on my active document. but how do i do that in code?
these seem like really easy questions, but no one seems to know and i can't find any good information on them. can you help me out, or point me somewhere on the web?
ron huang
rkhuang@hotmail.com
|
|
|
|
|
This might/might not help for queston 2
CDocument* pDoc;
CDocTemplate* pDocT;
POSITION p;
p = AfxGetApp()->GetFirstDocTemplatePosition();
pDocT = AfxGetApp()->GetNextDocTemplate(p);
pDocT->OpenDocumentFile(NULL);
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
CJulieView *pView = (CJulieView *) pChild->GetActiveView();
no bounce no play
|
|
|
|
|
Hi,
Does anybody know if there is any function in windows which returns the complete pathname of a file in a directory?
Thanks,
Deepak Samuel
|
|
|
|
|
The win32 function GetFullPathName ought to do it. It requires that the file is in your process' current directory though.
--
He is the painkiller. This is the painkiller!
|
|
|
|
|
At the command line enter Explorer /e,/select,c:
If the user selects a file can you get the return value from explorer?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Hi.
I have been trying to compile a library.
It compiles fine under gcc compiler.
Here is the part of original code that doesnt compile.
struct iax_frame {<br />
<br />
unsigned short callno;<br />
<br />
unsigned short dcallno;<br />
<br />
void *data;<br />
<br />
int datalen;<br />
<br />
int retries;<br />
<br />
unsigned int ts;<br />
<br />
int retrytime;<br />
<br />
int outoforder;<br />
<br />
int sentyet;<br />
<br />
int oseqno;<br />
<br />
int iseqno;<br />
<br />
int transfer;<br />
<br />
int final;<br />
<br />
int direction;<br />
<br />
int retrans;<br />
<br />
struct iax_frame *next;<br />
struct iax_frame *prev;<br />
<br />
struct ast_frame af;<br />
unsigned char unused[AST_FRIENDLY_OFFSET]; <br />
unsigned char afdata[0]; <br />
};<br />
<br />
The code where i get error is <br />
<br />
struct hell{ <br />
struct iax_frame fr2; <br />
unsigned char buffer[4096]; <br />
} buf;<br />
<br />
The error is
error C2229: struct 'hell' has an illegal zero-sized array
If you are wondering why wouldnt i just put
unsigned char afdata[4096];
then the reason is that the sizeof will give me 4096 included in it and this will make it incompatible for sending over this protocol cuz i need to send iax_frame first and the data of variable length later.
This is a library and i cannot change the code inside it.
So do you ppl have any thoughts of allocating some memory infront of iax_frame so that i get afdata[0] to be 4096 at runtime.
doing it assembly way might be difficult too.
By the way it compiles fine if i put buffer before iax_frame in hell. THe software crashes.
-----------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
I'm assuming these frames are allocated something like this:
struct iax_frame* p = malloc(sizeof(struct iax_frame) + 4096) so that it can be freed with a single
free(p); later on. Just change the size of afdata to 1, and
struct iax_fram* p = malloc(sizoef(struct iax_frame) + 4095) after modification..? It shouldn't break binary compatability.
--
He is the painkiller. This is the painkiller!
|
|
|
|
|
That's probably a gcc-specific extension (an array of 0 size is obviously illegal - how do you take its address or dereference it?).
MSVC has its own extension for a variable-sized array, which must be the last element in the struct
unsigned char afdata[]; The alternative is to make the array of size 1, which will work on all compilers (see for example the struct SHITEMID ).
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
Hello all
I'm getting this error in my code and my stack trace is the following .
_NMSG_WRITE(10) line 221
abort() line 44 + 7 bytes
AILERONPUSH! terminate(void) + 111 bytes
AILERONPUSH! _CxxUnhandledExceptionFilter(struct _EXCEPTION_POINTERS *) + 46 bytes
KERNEL32! 77eab45f()
KERNEL32! 77e8b2eb()
it's saying that "user breakpoint reached at xxxxx". I'm having an application in which I've one parent thread and 5 child threads. parent thread read records from database and assign them one by one to child threads for processing. I'm maintaining a queue which contains handles to child threads. Queue will be empty when all the threads are assigned a record and at this point parent thread will wait. once each thread finishes it's job it will put it's handle in queue so that parent can assign him the next record.
I'm experiencing the above error only if the no. of records to be processed are more than no. of threads( In this case threads will be used repetitively by parent thread depending upon their availablility in queue).
Can any one help me resolve this error? It'll be of great help if anyone can give me insight into situation's that cause the above error.
Thanks for your help
Hari.
|
|
|
|
|
Hi,
I just started with VS7, and wrote a programme which takes arguments, where can I give command-line arguments in Visual Studio 7.0 so that when I run the programme from VS it will automatically take them.
Thanks in advance
|
|
|
|
|
|
|
I need to print 2 pages per sheet in my application without showing any type of print dialogs. It also needs to work in Windows 98, 2000, XP. I am using a proprietary set of API's and I need to send a PRINTDLG object to this API's print function.
What this program does is print charts in some proprietary format(I have limited ability to manipulate these charts), and i want to print two charts on one sheet of paper. I can print a chart easily on a half of the page, but how would I print 2 on a sheet? I cannot combine the charts into one either.
I know that on this 98 machine, I can go to Print/Properties and select the "finishing" tab to print multiple per page. Is there a way to set this in my program? Also, is this something that Windows 98 allows me to do, or is it something that this particular print driver allows me to do?
I searched through the articles and checked out the Printing Section, but to no avail. Can anyone answer some/all of my questions?
Thanks
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
Printer driver only. Many HP printers, for example, do n-up printing like this. Anything you do is therefore printer specific.
The DEVMODE data is what's saying do two pages per sheet. If it was me, and I really HAD to do this, I'd get the default DEVMODE block, then get a block which does 2-up, and compare the two. Hopefully, dmDriverExtra would be the same value in both cases. However, you have to then dump the bytes from
the end of the DEVMODE (hint: dmSize) and examine them 'by hand'.
Hope this helps.
Steve S
|
|
|
|