Search:

Type: Posts; User: chiefmonkey

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    778

    Freeing strings from class destructor

    I have class, but I don't know how I should handle freeing its member string, when I don't have a prior knowledge of how the string would get allocated. So say that I created a class C1,



    class...
  2. Is DllMain's DLL_PROCESS_DETACH called when process is killed?

    I have a dll with DllMain() function defined as below.



    int DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*pReserved*/)
    {
    BOOL fRet = TRUE;

    switch (dwReason)
    {
  3. Replies
    0
    Views
    1,440

    Porting MFC project from VS to MSBuild

    Hi all,

    I have built a very simple MFC dialog application using Visual studio MFC application wizard. Now, I need to port this to MSBuild, so that the project would get built. I've created sources...
  4. First time Creating Win32 application with UI

    I need to create a simple Win32 application with UI. I've done some Win32 programming before, but haven't really created a Win32 non-console application.
    There seem to be many options/combinations...
  5. Ok, I see. Great, thanks!

    Ok, I see. Great, thanks!
  6. DLL exported functions - calling conventions and return types

    I've been trying to figure out if it matters which calling convention we use for DLL's exported functions. It seems that since both caller (one that loads the DLL and calls the function) and callee...
  7. Replies
    7
    Views
    1,784

    ignoring exception - is this a problem?

    If the function func() throws an exception, but we don't call the func() from try clause (to at least swallow the exception), let alone use catch clause, would that possibly show some undefined...
  8. Replies
    6
    Views
    1,502

    Yes, it does. Thank you for your comments.

    Yes, it does. Thank you for your comments.
  9. Replies
    6
    Views
    1,502

    Sorry about the confusion, I thought that people...

    Sorry about the confusion, I thought that people would assume that the function implementation is available. Ok, then what would happen if the function implementation is available? Where does get a...
  10. Replies
    6
    Views
    1,502

    Initializing a struct

    How is a field function of a struct allocated in terms of a memory it occupies in a memory segment that's allocated for a struct object?

    If I have a struct


    Struct A
    {
    char* string;
    ...
  11. Replies
    4
    Views
    4,145

    Should I export DllMain() function?

    I created a dll file, and I wanted the resources it uses to be initialized when the dll gets loaded, so I wanted to include DllMain function in the dll file.



    // DllMain.cpp
    #include...
  12. Replies
    4
    Views
    4,720

    scope of global variable vs. static

    Hi all,

    1) I had few questions regarding C++ static keyword. Is there any difference in scope between a in following two code snippets?



    //myfunc.h
    const int a = 1;

    int main(...)
  13. Replies
    1
    Views
    7,873

    What's an import library?

    Hi,

    I think I understand the concept of static(.lib) vs. dynamic(.dll) libraries, but I don't think I fully understand the various kinds of .lib libraries.

    1) I'm using MSBUILD to build a .dll...
  14. Replies
    1
    Views
    1,359

    Stale Symbol File Problem

    Hi,

    I added a public function to a class, built the source files, and tried to debug the resulting executable. The problem I found was that the new symbol file does not contain the added function....
  15. Building two different dlls using the same source file and different headers

    Hi all,

    I am trying to build two different dll files using a shared .cpp source file and two different header files using MSBUILD. So for an example, I want to use a.cpp and headera.h to compile...
  16. Compiling same file twice with different #include's with MSBUILD?

    In the code below, constantset_a.h and constantset_b.h define the same set of global constants but sets the constants with different values. Compiled myprogram.exe is to behave differently depending...
  17. Replies
    3
    Views
    1,290

    I didn't get your question. Does the problem...

    I didn't get your question. Does the problem require using the FoodLists class? If you want to have an empty class, why do you allocate memory for the tail node? And what does it mean to use tail and...
  18. Replies
    3
    Views
    739

    Class testing question

    Hi,

    I am trying to unit test a class I wrote. I wasn't sure how I should go about checking the values of private member variables after calling functions that set them. I was hoping that people...
  19. Replies
    5
    Views
    3,716

    Awesome, thank you guys :) Just one more...

    Awesome, thank you guys :)

    Just one more quick question regarding thread programming. After creating the thread, is it generally recommended to use WaitForSingleObject() to wait for the thread to...
  20. Replies
    5
    Views
    3,716

    CreateThread() function question

    So just by looking at the msdn document of the following kernal32 function,


    HANDLE WINAPI CreateThread(
    __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
    __in SIZE_T dwStackSize,...
  21. Replies
    4
    Views
    5,297

    Understand what >> and & operators do. Then...

    Understand what >> and & operators do. Then you'll be pretty much finished with the problem.
  22. Replies
    7
    Views
    2,882

    Please consider posting the entire code here, so...

    Please consider posting the entire code here, so that we can get a better idea.
  23. Replies
    6
    Views
    8,456

    Awesome, thank you guys!

    Awesome, thank you guys!
  24. Replies
    6
    Views
    8,456

    Creating Video Encoder/Decoder Question

    Hi guys,

    I wanted to create a programs that encode and decode videos using existing codecs (h.264, xvid, etc...), but I couldn't find much information on the web.

    So how does such program...
  25. Replies
    3
    Views
    1,614

    Thank you for your answer Dirkmass. You need to...

    Thank you for your answer Dirkmass. You need to use L"" when defining a wide character string literal. Wide character is a 2-byte character used to represent a UTF-16 character.
Results 1 to 25 of 34
Page 1 of 2 1 2