Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

San 0

@San 0
About
Posts
40
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Callback to a Non static Member function in C++ need to be called from a DLL
    S San 0

    Hi All, I need to implment a callback to a Nonstatic member function of a class. Which will be invoked through a DLL.DLL is an independent library.No dependency with the class. I Implemented with a static function. I need to know how it will be for a non static member function. My code is as follows for static implementation. I need to change it for a non static .Please help. class CCallbackTester { public: static int __stdcall CompareInts(const byte* velem1, const byte* velem2); }; int __stdcall CCallbackTester::CompareInts(const byte* velem1, const byte* velem2) { int elem1 = *(int*)velem1; int elem2 = *(int*)velem2; if(elem1 < elem2) return -1; if(elem1 > elem2) return 1; return 0; } int main(int argc, char* argv[]) { int i; int array[] = {22, 1, 3210, 2109, 1098}; Bubblesort((byte*)array, 5, sizeof(array[0]), &CCallbackTester::CompareInts); cout << "After the sorting\n"; for(i=0; i<5; i++) cout << array[i] << '\n'; getch(); } in DLL Bubblesort is as follows. void DLLDIR CALLBACK Bubblesort(byte* array, int size, int elem_size, CompareFunction cmpFunc) { for(int i=0; i<size; i++) { for(int j=0; j<size-1; j++) { if(1 == (*cmpFunc)(array+j*elem_size, array+(j+1)*elem_size)) { byte* temp = new byte[elem_size]; memcpy(temp, array+j*elem_size, elem_size); memcpy(array+j*elem_size, array+(j+1)*elem_size, elem_size); memcpy(array+(j+1)*elem_size, temp, elem_size); delete [] temp; } } } } Thanks San

    C / C++ / MFC c++ algorithms data-structures help

  • ToolTip with Close button
    S San 0

    I there any sample code available?

    C# help tutorial question

  • ToolTip with Close button
    S San 0

    Hi all, How to add a close button to System.Windows.Forms.ToolTip ? Please help me. Thanks in advance San

    C# help tutorial question

  • Exception handling in C++
    S San 0

    Hi all, What is wrong in this problem. Is this the right way to handle? #include class MyErrorClass { char *reason; int *i; public: MyErrorClass(char *r) { i = new int[6]; cout<<;"Constructor<<endl; reason = r; cout<<reason<<<endl; } char* giveReason() { return reason; } ~MyErrorClass() { cout<<"destructor"<<endl; delete[] i; } }; void main() { try { throw MyErrorClass("error"); } catch (MyErrorClass &e) { cout<<"Exception caught --- <<e.giveReason()<<endl; } } Thanks San

    C / C++ / MFC help question c++

  • Private Destructor
    S San 0

    Could please send me some sample code

    C / C++ / MFC question tutorial

  • Private Destructor
    S San 0

    Hi all, What is the use of declaring a private destructor? Where we are using this? Can anybody tell an example Thanks San

    C / C++ / MFC question tutorial

  • Deletegate
    S San 0

    Hi All, I have developed a formbased application. In which I need to use another dll which contains some callback. For using the callback inside the DLL from C# application what should be done?? In dll there is a struct which stores the callback pointers and one function uses to register this callback. Please help Regards San

    C# csharp help question

  • Size of a Class
    S San 0

    Yes I got an exception since Abc is a class. So how is to calculate the size?

    C# help

  • Size of a Class
    S San 0

    When I given as per your suggestion I got an exception as follows. An unhandled exception of type 'System.ArgumentException' occurred in exe Additional information: Type 'class' cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed.

    C# help

  • Size of a Class
    S San 0

    Hi all, I have a class public class Abc { private UInt32 x; private UInt32 y; private Int32 z; }; I need to get the size of the class. Please help! Thanks in Advance. San

    C# help

  • Structure converstion to Bytearray
    S San 0

    thankyou so much

    C# question csharp

  • DDE communication
    S San 0

    Sorry..Some problem while sending the Question

    C# tutorial question

  • Structure converstion to Bytearray
    S San 0

    Could u please send any sample code or link to imlement this. I am a beginner to this Regards, San

    C# question csharp

  • DDE communication
    S San 0

    Hi all, How to write a dda communication program? Regards, Sangetha

    C# tutorial question

  • DDE
    S San 0

    Hi all, How to write a dda communication program? Regards, Sangetha

    C# tutorial question

  • Structure converstion to Bytearray
    S San 0

    C# program is wrting the data. C program is reading the data. Regards, Sangeetha

    C# question csharp

  • Structure converstion to Bytearray
    S San 0

    Hi All, I have a struct in C# application used for serial port communication. I have to read the struct value send from C# application to a C application. What is to be done??? Thanks in Advance San

    C# question csharp

  • Setting the Maxlength of the TreeNode text
    S San 0

    Hi all, I want to restrict the Tree Node label length,when the label is being edited. How can i accomplish this. Thanks in Advance, San

    C# data-structures question

  • Bitmap on a Button
    S San 0

    How is it possible to put a bimap on a button?? Pls help San

    C / C++ / MFC graphics help question

  • Close Port
    S San 0

    Hi.... I am doing a Project in which I want to close a selected port which is opened by another application. How can I Solve the Same? Which function to be used??Please Help Thanks in Advance. SAN

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups