|
Don't see why not - the C run time DLL manages it for printf, sprintf etc which are variadic.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi Stuart,
thanks for the reply, since standard functions are exported so the user defined must also be exported.
|
|
|
|
|
well i want image of any extension to be converted into binary and save it into some file. then read it back to generate image can any one help me plz
|
|
|
|
|
Well, ANY extension (i assume you mean format by extension, since extension is just some characters after the name of the image, which basicly means nothing, i can rename my Whatever.bmp to Whatever.jpg, that won't actually make it a JPEG image...) is a bit broad, but you can use CxImage[^] to load many kinds of formats, then you can create a DIB section using CreateDIBSection[^] and then blit the image onto it. Since CreateDIBSection gives you a pointer at the pixel data, you can do with it whatever you like, like save it as it is. Doing this the other way should be quite straightforward too. Hope that helps.
p.s: Could be that CxImage itself gives you a way to access the "raw" pixel data (or even save it as raw format), am not sure about that, but you can find that out yourself.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
They are already binary. May be you want to encrypt/decrypt them.
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'm busy following a tutorial where the author uses DUMPBIN to list exports, and OllyDbg to get the assembly code for an exported function. How would I find the functions code in the complete disassemly, given that the export tables RVA's don't correspond to real addresses in the disassembly.
The conceptual Reversing process occurs every time someone looks at someone else’s code. But, it also occurs when a developer looks at his or her own code several days after it was written.
- Elliot Chikofsky, Executive Secretary, IEEE Technical Council on Software Engineering
|
|
|
|
|
I have not used OllyDbg, but using Windbg you can get the unassembly of a function using the u command.
u myexecutable!myfunction
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I can't load a DLL in WindDbg, or if I can, I don't know how to, so I can't try this, but thanks anyway, I've come right with OllyDbg.
The conceptual Reversing process occurs every time someone looks at someone else’s code. But, it also occurs when a developer looks at his or her own code several days after it was written.
- Elliot Chikofsky, Executive Secretary, IEEE Technical Council on Software Engineering
|
|
|
|
|
Doesn't the disassembly include function names? That's the way I tend to read assembly language files, although I'll grant that it's usually (but not always) assembly language generated by the C++ compiler.
If the export is in a DLL, then you can get OllyDbg to a) debug the DLL, and b) call a selected export (by name). The 'call selected export' dialog has a 'Follow in Disassembler' button, which will place the disassembler at the start of that export.
Oh - and if (reading between the lines of some of your other posts) it's a system file you're disassembling, for which you don't have debug symbol information - you can get the debug symbol information from Microsoft[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote:
Doesn't the disassembly include function names?
Not dumpbin's disassembly. I know it's rough, but the author insists on offline analysis, which I agree with, to learn how to read asm code properly. I have IDA Pro Free, which gives me everything, but I don't want everything for the same reason that the author doesn't.
Stuart Dootson wrote: If the export is in a DLL, then you can get OllyDbg to a) debug the DLL, and b) call a selected export (by name). The 'call selected export' dialog has a 'Follow in Disassembler' button, which will place the disassembler at the start of that export.
Cool, thanks!
The conceptual Reversing process occurs every time someone looks at someone else’s code. But, it also occurs when a developer looks at his or her own code several days after it was written.
- Elliot Chikofsky, Executive Secretary, IEEE Technical Council on Software Engineering
|
|
|
|
|
Hey ppl,
I have create a static library project and build it successfully on debug mode and release mode.
Now I have a different project which uses this static library with
#paragma comment (lib, mylib)
When I compile and run my project in debug mode it runs successfully.
When I compile my project in release mode it compiles successfully but wont run. And when I try to run release mode inside Visual Studio it gives me these errors:
Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
Error 2 fatal error C1083: Cannot open source file: '.\XTexture.cpp': No such file or directory c1xx
Error 3 fatal error C1083: Cannot open source file: '.\XTextBox.cpp': No such file or directory c1xx
Error 4 fatal error C1083: Cannot open source file: '.\XText.cpp': No such file or directory c1xx
Error 5 fatal error C1083: Cannot open source file: '.\XPen.cpp': No such file or directory c1xx
... list goes on.
These files are included in mylib.lib that's why I used static lib. So why this happens?
One more thing, my library's file size in debug mode is 3.103Kb and in release mode 11.349Kb. I expect it would be more less in relase mode..
Thank you...
|
|
|
|
|
dehseth wrote: When I compile my project in release mode it compiles successfully but wont run. D'Oh! And when I try to run release mode inside Visual Studio it gives me these errors:
What do you mean by "Run" ? These errors are compilation errors, you can't have those when you run your program
dehseth wrote: Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
What is "c1xx" at the end ?
Those files which give errors (XWindow.cpp, XTexture.cpp, ...), are they part of your exe or part of your static lib ?
|
|
|
|
|
Application compiles and link successfully:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
But when I double click to generated exe file it crashed So I open visual studio window and press Run button and it gives me these errors I do not get why I get em. There's no c1xx file...
Should I do anything more than putting #pragma comment (lib, "mylib") and include the main header file to make it run on release mode?
|
|
|
|
|
I just delete all Temp files Debug Output files and Release output files. Rebuild library. And rebuil application. Now it runs..
Sometimes we need housekeeping i guess..
|
|
|
|
|
hi every one
How can i create object of a class with protected constructor?
i dont want drived it from base class.
is it possible using friend class?
Plz Help me
|
|
|
|
|
Yes.
Eg:
class base
{
protected :
base()
{
}
friend ami;
};
class ami
{
public:
base obj;
};
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
|
|
|
|
|
i test it but i get this error:
error C2248: 'CAsynlstn::CAsynlstn' : cannot access private member declared in class 'CAsynlstn' [path]: see declaration of 'CAsynlstn::CAsynlstn'
class CMyCtrl : public COleControl
{
private:
friend class CAsynlstn;
CMyCtrl();
~CMyCtrl();
}
class CAsynlstn : public CAsyncSocket
{
private:
CAsynlstn(COleControl* pDlg);
virtual ~CAsynlstn();
};
public:
CAsynSvSk* m_pSrvrSock;
m_pLstnSock = new CAsynlstn(this)
|
|
|
|
|
class CAsynlstn : public CAsyncSocket
{
private:
public:
CAsynlstn(COleControl* pDlg);
virtual ~CAsynlstn();
}
m_pLstnSock = new CAsynlstn(this);
If you are creating object straight like this it has to be public.
btw, what are you trying to do with this?
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
|
|
|
|
|
A public static method in the class can be used to create the object of the class.
The caller can then use the static method to create an object of the class.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
can you give me an example?
|
|
|
|
|
|
|
|
I wish someone here could help you out, but I suggest you not to *magnify* your question. Remove all those bold style and post a neat question. An example:
Hi Friends,
I have a top level window. I need to show background magnified contents into the window. [Explain a bit more here]
My approach:
I created the desktop bitmap on application startup i.e. m_hbitmapScreenShot.
I created a WS_POPUP window; on each mouse move call i move the window by specified offset calling MoveWindow API and draw the new location contnets into it.
CDC* pDC = GetDC();
CRect rc;
GetClientRect(&ec);
::StretchBlt(pDC->;m_hDC, 0, 0, rc.Width(), rc.Height(), m_hMemDC, nDesX, nDesY, m_nGlassSize /m_nZoomLevel,
m_nGlassSize / m_nZoomLevel, SRCCOPY);
I have two issues
1) When I move the window the background window is not painted at once; so my window traces remains at old location for a while.
2) How to capture background window bitmap when my window is up; I dont need my window in screen shot.
Also, The Other magnified glass disappears as left mouse button is up.
But I need to show it always.
I am attaching screen shot "Magnify.JPG" for your reference.
"Magnify.JPG" location
http://picasaweb.google.com/Smadhukar2000/MFC#5308114585517259826[^]
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
First of all, I agree with VuNic, please don't "run into the room and start yelling 'Look at me, look at me'", using the bolds will just get people upset around here.
And for your problem, try using a Layered window[^] for your "magnifying glass". If you get the desktop DC and use StretchBlt to blit from it you should see that your layered window over the desktop is not in the capture. But note that this works for all layered windows so your screen capture will not show ANY layered windows, not just your own.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|