nullptr 167 Occasional Poster

Just continue with the assistance you're receiving at BleepingComputer. :)
http://www.bleepingcomputer.com/forums/t/569809/windows-security-helper-dll/

nullptr 167 Occasional Poster

For a template <class T> function all you need to do is substitute the type 'T' for the POD type.
e.g.

template <class T>
void showArray(T const arr[], const size_t size)
{
    for (size_t i = 0; i < size; ++i)
        std::cout << arr[i] << ' ';

    std::cout << std::endl;
}
nullptr 167 Occasional Poster

You mean checking as in something like this?

if (hr == S_OK) ?

Yes.

The main problem with your code is that the szFileName in URLDownloadToFile is invalid.
"C:\users\my documents\visual studio 2008\projects\nq data\nqquotes.txt"
should be either
"C:\\users\\my documents\\visual studio 2008\\projects\\nq data\\nqquotes.txt"
or
"C:/users/my documents/visual studio 2008/projects/nq data/nqquotes.txt"

It's also not necessary to pre-create the text file. If URLDownloadToFile is successful then the text file will be created.

nullptr 167 Occasional Poster

Are you passing flower, water and path by reference in the execute function.
This should work:

void execute(int array[ROWS][COLS], int& flower, int& water, int& path)
{
    for (int i = 0; i < 20; i++)
    {
        initializeArray(array);
        int row = 6, col = 1; // reset position
        int position = array[row][col]; // places Harvey in the correct spot

        while (position != 3 && position != -1)
        {
            position = move(array, row, col, position);
            update(array, row, col, position, flower, water, path);
        }
    }
}

You may also wish to seed the random number generator using srand.

nullptr 167 Occasional Poster

at lines 78. 79

int row = 6, col = 0;
int position = array[row][col]; 
// at this point position value = 3

Therefore lines 81 - 85 won't do anything.

while(position != 3 && position != -1)
{
    position = move(array, row, col, position);
    update(array, row, col, position, flower, water, path);
} 
nullptr 167 Occasional Poster

I've only skimmed over your code so there could be things I've missed. At first glance:

In your execute function, you need to pass flower, water and path by reference, otherwise the variable values declared at line 25 will never change within the scope of main()

You should also verify whether your outfile is open before trying to write to it.

nullptr 167 Occasional Poster

Because you are calling LookupAccountSidW(...), myDwordNameLength and myDwordDomLength will contain the buffer size needed in wide chars. Thus on lines 23 and 24 you are only allocating half the required size for each buffer.
Change those lines to:

myTrusteeName = (LPWSTR)GlobalAlloc(GMEM_FIXED, myDwordNameLength * sizeof(wchar_t));
myDomainName = (LPWSTR)GlobalAlloc(GMEM_FIXED, myDwordDomLength * sizeof(wchar_t));
BenWard commented: Saved my ass! +1
nullptr 167 Occasional Poster

AFAIK, the first call to LookupAccountSidW will return the buffer sizes needed in TCHARS. So you will need to allocate bufsize * sizeof(wchar_t)
You also need to free the memory.

nullptr 167 Occasional Poster

The executables created by Turbo C are totally incompatible with 64 bit operating systems.
On 64 bit Windows you should be able to run both 32 and 64 bit executables, you just need a non-prehistoric compiler to produce the executable.
Look into MinGW (GCC) and Visual Studio as already mentioned by Mike.

nullptr 167 Occasional Poster

It would appear that Ahmad is most adept at copy and paste.
Compare his last post to CrateMuncher's comment at http://www.reddit.com/r/answers/comments/2dplea/whats_the_difference_between_c_c_and_c/

Traevel commented: Good spot +6
Ahmad Imran commented: "Nice to meet u ", says CrateMuncher +0
nullptr 167 Occasional Poster

This looks like it was copy/pasted with some modifications from another coding site.
For the sake of consistency, you should always use CreateWindowEx and the WNDCLASSEX struct as CreateWindow and WNDCLASS are deprecated.
You also need to check function return values and handle any errors.
As for the main problems with this code:
You need to specify identifiers for each checkbox. At present they're both set to (HMENU) 1.
e.g

#define IDC_CHECKBOX1   200
#define IDC_CHECKBOX2   201

CheckDlgButton(hwnd1, 1, BST_CHECKED) needs to be sent to the HWND of your main window with the appropriate identifier. The same goes for BOOL checked = IsDlgButtonChecked(hwnd1, 1) which would be better if it was defined as
BOOL checked = (IsDlgButtonChecked(m_hwnd, IDC_CHECKBOX1) == BST_CHECKED);

Before you enter the message loop at line 37, there should be:

ShowWindow(m_hwnd, nCmdShow);
UpdateWindow(m_hwnd);

Where m_hwnd is the HWND returned from creating the main window.

m_hwnd = CreateWindowEx(...);
if (m_hwnd == NULL)
{
    // handle error and exit
}

If you are coding in C++ then use the appropriate C++ headers rather than the C headers. (Do a google search for cstdlib vs stdlib.h) and only include the headers that you will be using.

Have fun. :)

ddanbe commented: Deep knowledge +15
nullptr 167 Occasional Poster

Sorry, I don't have nasm installed to test, but if the code is inline then leave out the ret.
The code stores the reversed array in the original memory location.

nullptr 167 Occasional Poster

Try the following:

        ; save ebx
        push ebx
        mov esi, array
        mov edi, array
        add edi, 16

    reverseloop:
        ; move content of pointers into a register (dereference pointers)
        mov eax, [edi]
        mov ebx, [esi]
        ;swap elements
        mov [edi], ebx
        mov [esi], eax

        add esi, 4
        sub edi, 4
        cmp esi, edi
        jb reverseloop
        ;restore ebx
        pop ebx
        ret
nullptr 167 Occasional Poster

The first thing I'd do is update to the Orwell Dev-C++ fork, which is fully maintained and up to date.
http://sourceforge.net/projects/orwelldevcpp/

nullptr 167 Occasional Poster

Also in line 11:
count<<"enter second amount";
It should be
cout << "enter second amount";

L7Sqr commented: Nice catch :) +9
nullptr 167 Occasional Poster

Have a read of MSDN for the WM_COMMAND message. For a menu, only the menu identifier is passed via the low word of the wParam, the lParam is zero.
So your code:
SendMessage((HWND)lParam , WM_COMMAND, wParam, lParam) will be equivalent to
SendMessage((HWND)OL , WM_COMMAND, wParam, 0L)

nullptr 167 Occasional Poster

You should use length rather than MAX_ITEMS in DeleteItem(ItemType x).

nullptr 167 Occasional Poster
nullptr 167 Occasional Poster

Read the rules - https://www.daniweb.com/community/rules
You will not receive help at these forums for any illegal activities.

nullptr 167 Occasional Poster

ream

nullptr 167 Occasional Poster

coot

nullptr 167 Occasional Poster

Have a look at Don't Sleep available at http://www.softwareok.com/?seite=Microsoft/DontSleep

nullptr 167 Occasional Poster

You need to make an honest attempt to write the code for your homework, otherwise you'll receive no help.

nullptr 167 Occasional Poster

Remove #include <string.h> and replace with #include <string>
As the string object is in the std namespace, you can either replace all functions and variables in the Dog class that contain string to std::string
or
put using std::string; before the Dog class.

nullptr 167 Occasional Poster

bole

nullptr 167 Occasional Poster

Your error is that the function you've written is illogical. It looks like you wrote the first thing that came to mind and somehow hoped that it would magically solve the problem.

Can you write the code that will copy the 'v' string to the buffer?
Get that part working to start with and then the rest should be simple.

nullptr 167 Occasional Poster

Something like for (int i = numWords-1; i >= 0; --i)

You wrote for(int i = 0; numWords-1 <= 0; i--) - with this code, the only iteration that would occur is if numWords is 1. Any other positive value for numWords results in your loop doing nothing.
eg: Assume numWords = 5. When would (5 - 1) ever be less than or equal to zero?

nullptr 167 Occasional Poster

Could you post the code that you currently have?

nullptr 167 Occasional Poster

At line 3: for(int i = 0; i >= numWords; i--) // how does this make any sense?
I assume what you are wanting to do is to iterate from the the last word index to the first word index.
ie. from numWords-1 to 0
So rewrite line 3 to reflect that logic.

nullptr 167 Occasional Poster

Try running the 'AVG PC TuneUp and TuneUp Utilities Remover', available at http://www.avg.com/tools#tba1

nullptr 167 Occasional Poster

There are further things that are immediately noticeable in the last code you posted.
Check your spelling on lines 59 and 63 - set_at_beign should be set_at_begin

nullptr 167 Occasional Poster

You could call UnregisterHotKey then RegisterHotKey.
If this isn't what you need, could you clarify what you are wanting to achieve.

nullptr 167 Occasional Poster

To clarify things, are you saying that the laptop was running fine, then it just completely turned off with no error message and since then the laptop will not turn on?

Try removing the battery and disconnecting the power adapter. Then hold the power button down for 30 seconds.
Put the battery back in, connect the power adapter and try starting it.

nullptr 167 Occasional Poster

It seems that your laptop is overheating due to a massive build up of dust clogging the air intake fan, with the possibility that you may also have fan failure. Have look underneath the laptop, do you see a dust build up around the air intake?
Leave the laptop off for a while, then try starting it. If it starts, can you feel any air coming out the exhaust outlets or hear a fan spinning?
Unforunately, to completely clean the dust out involves almost disassembling the entire laptop. See if you can obtain a manual for your laptop. That should show you what needs to be disassembled. From there you can decide whether this is an issue you wish to rectify yourself.
If it seems too overwhelming, I'd recommend having the laptop serviced by a reputable computer repairer.

nullptr 167 Occasional Poster

Peter Ferrie has many interesting papers on anti-(unpacking/debugging/emulation) techniques.
Google for his homepage and Microsoft Malware Protection Center page.

nullptr 167 Occasional Poster

Who cares what I prefer, isn't it about which design you prefer?
If I was to get a new Windows PC then I'd go for Win 8.1 simply because it's architecturally superior.

nullptr 167 Occasional Poster
nullptr 167 Occasional Poster

Probably in a darker area of the internet. ;)

Yes, Google software cracking forums

I AM NOT DOING THIS AS FOR HACKING PURPOSE, BUT I WANT TO KNOW.
AS TO CREATE THE BEST PROGRAMS WE SHOULD ALSO KNOW HOW TO PROTECT OUR PRODUCT BY HACKING.

You have to realise that any paid software, if it's something people want, then it will eventually be cracked. All you can really do is make it more difficult and time consuming to RCE.

Personally, I consider that this topic has now gone as far as possible without breaking Daniweb's rules.

nullptr 167 Occasional Poster

That question has already been answered in your thread at MSDN.
For an idea about drawing non themed buttons refer to http://blog.quppa.net/2012/02/12/drawing-non-themed-push-buttons-in-windows/

cambalinho commented: thanks for all my friend +2
nullptr 167 Occasional Poster

If you specify BS_OWNERDRAW then you shouldn't combine any other button styles with it.
I couldn't reproduce your problem with WM_COMMAND using VS 2012, though I did change the code to SetWindowText(hwnd, "hi");

nullptr 167 Occasional Poster

why the WM_COMMAND message is ignored?

It shouldn't be ignored. Under what cicumstances is the message being ignored?
Post your code if you'd like someone to have a look.

nullptr 167 Occasional Poster

I did some testing and if you call InvalidateRect(hButton, NULL, false), this will cause a WM_DRAWITEM message to be sent to your control.

if (KeyPressed(VK_MENU)==true)
    InvalidateRect(hButton, NULL, false);
nullptr 167 Occasional Poster

Why not just call a function that does the redrawing?

LRESULT CustomDrawButton(HWND button_hwnd, WPARAM wParam, LPARAM lParam)
{
    // drawing code goes here

    InvalidateRect(button_hwnd, NULL, FALSE); // TRUE to erase the background
    UpdateWindow(button_hwnd);

    return 0;
}
nullptr 167 Occasional Poster

The first computer I actively used was an Atari 1040ST, mainly to be able to run Steinberg Cubase.
http://en.wikipedia.org/wiki/Atari_ST

nullptr 167 Occasional Poster

Edit to above post.
Re 2. It works on Windows 7 without visual styles for buttons, I've not tested on other OS.
I know for things like menus it just ends up ugly and unaligned without visual styles.

nullptr 167 Occasional Poster
  1. Yes, use BS_TEXT combined with either BS_LEFT, BS_RIGHT, BS_TOP or BS_BOTTOM.
    e.g. with BS_RIGHT, the icon will be on the RHS of the button and the text will also be justified to the right.
  2. No, for that you need to use BS_OWNERDRAW.
  3. No
nullptr 167 Occasional Poster

Try webBrowser1.Document.GetElementById("email").InnerText

nullptr 167 Occasional Poster

Create the button in WM_CREATE with button style BS_OWNERDRAW only.
Handle the drawing in WM_DRAWITEM

nullptr 167 Occasional Poster

Have a look at Forger's Win32 tutorial at http://www.winprog.org/tutorial/
You can download it in pdf format.
Under the heading 'Graphics Device Interface' http://www.winprog.org/tutorial/bitmaps.html
Become familiar with the bitmap functions http://msdn.microsoft.com/en-us/library/windows/desktop/dd183385%28v=vs.85%29.aspx

nullptr 167 Occasional Poster

Do you have an XP installation or recovery disk for the PC?
If you do, refer to: https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader