|
i have image.bmp it is saved in image.bin file format, bin is the file format.
|
|
|
|
|
jiya-123 wrote: i have image.bmp it is saved in image.bin file format, bin is the file format.
bin is not a format, merely an extension on the name of the file. You need to understand the actual format of the contents in order to convert it into a bitmap. Go back to the documentation for the program that created the file to see exactly how it is formatting the data. It is impossible to answer your question without that information.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Good luck.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
until you explain what this "binary format" is, nobody can help you.
|
|
|
|
|
sorry .bin is the file extension.
|
|
|
|
|
Yeah, but what is the INTERNAL format of the .bin file?
I could rename a .bmp file to a .bin file and it would still be a BMP file.
Watched code never compiles.
|
|
|
|
|
jiya-123 wrote: sorry .bin is the file extension.
Quote Selected Text
You have repeated this enough times; try answering the basic question: what is the format of the data in the file? If you do not understand what we are asking then you are never likely to resolve this issue.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
you should present some code here and pin point the problem. May be you are not telling the problem as you should be telling (well im not sure about that tooo).
|
|
|
|
|
For example :
let's assume
that program uses a code like this:
#include<iostream><br />
<br />
<br />
void convertToASCII() {<br />
FILE *bmp;<br />
FILE *ASCII;<br />
bmp=fopen("1.bmp","r");<br />
ASCII=fopen("1.bin","w");<br />
char c; int x; <br />
while( (c = fgetc( bmp )) != EOF )<br />
{<br />
for( x = 0; x < 8; x++ )<br />
fputc( '0' + !!(c&(1<<x)), ASCII );<br />
}<br />
<br />
}<br />
int main() {<br />
convertToASCII();<br />
}<br />
<br />
you are looking for the function that converts back the bin file to bmp i guess..
as far as i understood your question is this..
am i right?
|
|
|
|
|
hi all,
i m use sockaddr_in to cocket connection.
is there any valid range of pot number to establish connection or i can use any port number for connection.
please help me for this.
thanks in advance.
|
|
|
|
|
See here[^] for some advice; always best to try Google first.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hi everyone! I am writing a Bank Simulation program in C++ and it's a console application. In entering account passwords I do not want the characters entered to be shown on screen but to output the asterik character for every character entered as follows
while (true)
{
cout << "\n\nEnter administrator account password (press C to cancel): ";
int i(0);
char input;
while ((input = getch()) != '\r' && i < ADMINISTRATOR::ADMIN_PASS_LENGTH)
{
if (input == '\b')
{
if (i > 0)
{
password[i - 1] = '\0';
--i;
continue;
}
}
password[i] = input;
++i;
cout.put('*');
}
password[ADMINISTRATOR::ADMIN_PASS_LENGTH - 1] = '\0';
....
....
}
I used the function
getch() which provides unbuffered input. When a character is entered, it is saved and the asterik character (*) is printed on the screen. If the character entered is the backspace, the last character saved in the password buffer is cleared by setting it to '\0'. This seems to work fine.
Now the problem is that when the backspace character is entered, I also want to clear the asterik characters printed in the console window so that it can be seen that the asterik characters are being cleared but I don't know how I can clear the asterik characters as the user presses the backspace character. I need help.
|
|
|
|
|
If you're developing for Windows then consider using the console API , here[^] an example.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
also clrscr() is there in turbo c++ and some others.
|
|
|
|
|
Dan_K wrote: Now the problem is that when the backspace character is entered, I also want to clear the asterik characters printed in the console window...
Can't you just print a space character?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
when I finished the wizard, a popup window showed the following text:
<!- Copyright (c) Mircrosoft corporation. All rights reserved. -->
<HTML DIR="LTR">
<HEAD>
<TITLE>Win32 Application Wizard</TITLE>
...
BTW, not only in vs2010, another application (mobicreator) showed the familiar text.
How to fix it?
Thanks.
|
|
|
|
|
followait wrote: Mircrosoft
This does not look like anything legally produced by Microsoft. What exactly are you trying to do (i.e. whaich Wizard are you using) and what steps did you follow.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
1. new project
2. Visual C++/Win32/Win32 Console Application
3. Enter the name of the project (TestNamespace), click ok
Then it pops up a windows, show some code in html, with jscript.
I tried to copy it here, but it isn't support to be copied.
BTW, I have tried to repair it using the dvd, but it didn't solve the problem.
|
|
|
|
|
I just tried the same steps with VC++ Express and it worked fine. I can only suggest that your DVD is corrupt in some way. You could try getting another copy of the DVD, or alternatively get a copy of the Visual Studio 2010[^] trial to see if that works.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
i want to hide the system menu that is displayed when u click the icon on the mainframe title bar. at the same time i want to retain the 3 buttons namely Minimize, Maximize/Retore and close.
i tried the following options
1) Removed the WS_SYSMENU window style. this results in removal of menu as well as all 3 the buttons.
2) Removed all the menu items as follows:
CMenu *pSysMenu = GetSystemMenu();
if(pSysMenu)
{
int nCount = pSysMenu->GetMenuItemCount();
for(int i=0; i<ncount; i++)
="" psysmenu-="">RemoveMenu(0, MF_BYPOSITION);
}
this second option works fine but it results in disabling of the Close button.
any suggestions are welcome.
also i am wondering whats that event handler which shows the system menu on click of that icon?
so that i can override that function and skip the displaying of the system menu.
thanks
|
|
|
|
|
Where should i put this handler in an MDI application. I have put it in the CframeWnd class but it gives error "overload function differs only by return type??
UINT CMainFrame::OnNcHitTest(CPoint point)
{
CRect rc;
GetClientRect(&rc);
ClientToScreen(&rc);
return rc.PtInRect(pt) ? HTCAPTION : CFrameWnd::OnNcHitTest(pt);
} what to do know
|
|
|
|
|
If you are compiling this code in VS2005 or later (which it sounds by the error given) then change the return type to LRESULT. Starting with VS2005 they changed the function signature from UINT to LRESULT.
Kelly Herald
Software Developer
|
|
|
|
|
Hello friends,
I am using MAC address to implement licensing in my application. As far as I know, MAC address of every system is unique and is very commonly used for licensing purpose.
For giving license of my application, I generate a unique key based on MAC address of a particular system and send that key to the customer. But the problem is that every time I format my system, I get a different MAC address. Doing this is problematic as every time customer format his system, he will need a new key (as his MAC address will also change on formatting his system).
Another problem is that if someone have two OS say XP and VISTA on his machine, he'll need two different keys to activate the license on both of the OS.
What I want, I get same MAC address even though customer keep on formatting his system (so that he can use same key every time). Also I get same MAC address on all the Operating Systems on a single machine (so that he can use same key on all the Operating Systems on his machine). Is it possible to do so? If yes then how? If not then why not? Please help me.
Right now I am using below code to get MAC address of a system:
std::string strMACAddress;
try
{
PIP_ADAPTER_INFO pAdapterInfo = NULL;
ULONG ulOutBufLen = sizeof (IP_ADAPTER_INFO);
pAdapterInfo = new IP_ADAPTER_INFO();
if (pAdapterInfo == NULL)
{
return;
}
int iResult = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen);
if ( iResult == ERROR_BUFFER_OVERFLOW )
{
delete pAdapterInfo;
pAdapterInfo = new IP_ADAPTER_INFO[ulOutBufLen];
if (pAdapterInfo == NULL)
{
return;
}
}
if ( iResult != ERROR_SUCCESS )
{
iResult = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen);
if ( iResult != ERROR_SUCCESS )
{
delete pAdapterInfo;
pAdapterInfo = NULL;
return;
}
}
strMACAddress = pAdapterInfo->AdapterName;
delete pAdapterInfo;
pAdapterInfo = NULL;
}
catch (...)
{
}
Thanks in advance,
Best Regards
Aseem
|
|
|
|
|
At the end of the day you're only querying a software function that returns the MAC address of the NIC.
So as long as the TCP drivers all query the same software function, you can use either the actual MAC address, or an arbitrary one - so long as the software function can return (a) the hardware encoded address and
(b)some other arbitrary value.
In fact, using only the MAC of the NIC is one of the laziest, sloppiest (and most easily defeated) licensing schemes I can think of.
You bigger problem is the fact that one copy of the software (and it's MAC-specific key) can be freely given to and used by anybody that is inclined to change their MAC address to suit the registration key. Been there done that, still got the t-shirt.
http://www.klcconsulting.n[^]Here's some quick tidbits:http://www.klcconsulting.net/Change_MAC_w2k.htm
Pulling serial numbers from Motherboards & HDDs are typically more effective - This is what ZBrush 3.0 used to use.
But seriously, if your product is worth protecting it's worth spending a couple of $100 on isn't it?
You're far better off using a commercial protector that utilizes a virtual machine and obfuscates the machine code at the same time.
Armadillo was(is) a pretty good exe packer/encryptor/anti-debugger (http://www.siliconrealms.com/)
ASPack is also a b**tard to reverse engineer.
VmProtect is one nasty piece of work. Virtual machine and obfuscation (http://www.vmprotect.ru/)
The point is - these folks spend their working weeks coming up with protections schemes. You spend it coming up with the app.Would you service your own car if you kinda had a vague idea of what you were doing, while you knew you could afford to pay somebody that knew all of the idiosyncrasies of the particular model and any little tricks and tips for dealing with them??
If it's worth protecting - I'd suggest you do it properly.
|
|
|
|
|
Hi friend,
Thanks for reply. Yeah, you are right in that one should use third party licensing libraries. But my software is very cheap. It would cost around 5-8 dollars per license. Also I don't know if I could capture the market. So cannot afford to buy any licensing scheme.
But yes, as you said licensing based on MAC address is not a good approach. Can you help me in how get serial number of mother board?
3-4 months back, I did try to get serial number of mother board using WMI. But I could not do so. If you can provide some sample code about how to get serial number of mother board using any other mean (but using C++ only)?
Regards
Aseem Sharma
|
|
|
|