Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~10K People Reached
Favorite Tags
Member Avatar for unclepauly

hello, i am using the Graphics.DrawLine method in C# and this is fine for thin lines but for thick lines it draws really badly. i have sample code to reproduce the problem below. just create a new c# forms application and add a picture box to the form. make the …

Member Avatar for jayantpaliwal
0
689
Member Avatar for unclepauly

hello, im writing an HTTP proxy in C#. the proxy should capture both HTTP and HTTPS traffic from the web browser. so far i have implemented the GET and POST requests no problem, but the CONNECT request i am having a little trouble with. there does not appear to be …

Member Avatar for unclepauly
0
2K
Member Avatar for vijaykrishnabor

Hi is it possible to have recursive function as inline function ? this was question asked interview please help me

Member Avatar for mike_2000_17
0
2K
Member Avatar for unclepauly

hi, i have this code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary("Component1.dll"); [/inlinecode] i get this compile error: Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [15]' to 'LPCWSTR' c:\Documents and Settings\Administrator\Desktop\Component1\Client1\Client1.cpp 9 so i changed the code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary((LPCWSTR)"Component1.dll"); [/inlinecode] however GetLastError returns …

Member Avatar for memphis.ray
0
966
Member Avatar for unclepauly

hi, well i have posted this on two other forums without success, hoprfuly you guys can help me ! the scenario - i have a native c++ dll that creates and initializes a string, which is a char array. [CODE] char pRet[1024]; memset(pRet, 0, 1024); strcpy(pRet, "change me!"); [/CODE] the …

0
99
Member Avatar for unclepauly

im making a singleton class in c++ and have a couple of questions. first, heres my .h and .cpp files: [CODE] // Singleton.h class Singleton { public: static Singleton GetSingleton(); void DoSomething(); ~Singleton(); private: Singleton(); static Singleton* _instance; }; [/CODE] [CODE] //Singleton.cpp Singleton* Singleton::_instance = 0;// initialize pointer //********************************************************************************************* Singleton::Singleton() …

Member Avatar for jencas
0
2K
Member Avatar for unclepauly

hello, ive got some code that works fine, except when the UdpClient sends to the local host. the code is below: [CODE] //some duff data to test with byte[] m_RecBuffer = new byte[3]{0x00, 0x01, 0x02}; //new client object UdpClient udpClient = new UdpClient(34567); //the remote address IPEndPoint ipRemote = new …

0
70
Member Avatar for unclepauly

im developing an http proxy in C#. my problem is reproducable outside of this language so if you can tell me of a better forum then that would be good, as i am stumped. to cut a long story short: sometimes, the response i get back from the server is …

Member Avatar for unclepauly
0
222
Member Avatar for unclepauly

i have a bunch of data i want to pass to CreateThread. i created a struct as per the msdn documentation. here it is: [CODE] typedef struct ThreadRecvData { std::list<char> data; Ogre::String addr; unsigned long port; } THREADRECVDATA, *PTHREADRECVDATA; [/CODE] then i initialise the struct, again as per the msdn …

Member Avatar for unclepauly
0
112
Member Avatar for unclepauly

hi, im creating a library, in which there is a winproc that is started in a function called StartMessageLoop. This function is started as a seperate thread from another function called Init. heres the code: [CODE] void MyClass::Init() { //...some code _beginthreadex(NULL, 0, StartMessageLoop, (void*)NULL, 0, 0); WaitForSingleObject(m_VALIDHWNDEVENT, 10000); //...some …

0
75
Member Avatar for d0ugg

Hi all, So i'm creating a program that will read a file into a linked list. And the user will be able to add, remove and display the list. Im suppose to create a search function in order to find the link to remove or add or display. Here is …

Member Avatar for unclepauly
0
84
Member Avatar for unclepauly

can someone please try and explain something to me... i have 2 functions, lets call them FuncA and FuncB. FuncA calls FuncB, and FuncB does some stuff then simply returns. both functinos are placed in try...catch statements: [CODE] void FuncA() { try { FuncB(); } catch { trace("FuncA caught exception …

Member Avatar for vijayan121
0
109
Member Avatar for unclepauly

hi, im using this code to serialize my class into xml: [code] [COLOR=green]public[/COLOR] [COLOR=green]static[/COLOR] [COLOR=green]void[/COLOR] Save([COLOR=green]Class1[/COLOR] myClass) { System.Xml.[COLOR=green]XmlTextWriter[/COLOR] w = [COLOR=green]new[/COLOR] System.Xml.[COLOR=green]XmlTextWriter[/COLOR]([COLOR=green]@"./myFile.cfg"[/COLOR], [COLOR=green]Encoding[/COLOR].ASCII); System.Xml.Serialization.[COLOR=green]XmlSerializer[/COLOR] x = [COLOR=green]new[/COLOR] System.Xml.Serialization.[COLOR=green]XmlSerializer[/COLOR](myClass.GetType()); x.Serialize(w, myClass); w.Close(); } [/code] my class has only 2 things to serialize. these are private member variables, which i provide …

Member Avatar for unclepauly
0
152
Member Avatar for unclepauly

I've been learning about aggregating COM objects. I dont understand why we 'need' 2 IUnknowns (ie the delegating IUnknown and the Non-delegating IUnknown). Surely the same effect can be achieved with just the 1 usual IUnknown? Eg, The outer component implements interface IX and aggregates interface IY, which is implemented …

Member Avatar for unclepauly
0
165
Member Avatar for unclepauly

hi, im creating a win32 dll using VS.NET 2005. actually im creating a COM component so i need to implement DllRegisterServer. The problem is that when i call regsvr32 on the dll, i get the error 'the dll was loaded but the dllRegisterServer entry point was not found'. Now, the …

Member Avatar for unclepauly
0
317
Member Avatar for unclepauly

i have a BaseClass and a DerivedClass. i need the BaseClass to register a glut callback, but i need the DerivedClass to determine what the callback does. heres the code: (.h) class BaseClass { public: BaseClass(); ~BaseClass(); protected: static void _renderCallback(void); virtual void Render(); }; (.cpp) BaseClass::_renderCallback(void) { Render(); } …

Member Avatar for thekashyap
0
201
Member Avatar for unclepauly

i am using CreateThread to, unsurprisingly, start a thread :p is it possible to return a value? i need to return either true or false at least. ideally i need to return 0, 1 or 2 to indicate the success of certain things that go on inside the thread. I …

0
73
Member Avatar for unclepauly

i am using a couple of methods to calculate the distance between any 2 points on the earths surface. the methods are the law of cosines, and the haversine formula. the law of cosines formula uses the C++ functions acos, sin and cos, all found in math.h: acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat1).cos(long2−long1)) the haversine …

Member Avatar for unclepauly
0
98
Member Avatar for unclepauly

if i have a map of size 7, so something like this: 1 / \ / \ 2 3 / \ / \ / \ / \ 4 5 6 7 and i have the key and the value of the map to be both ints, then would memory be: …

Member Avatar for unclepauly
0
90
Member Avatar for unclepauly

heres a question: i understand that array insertion is carried out in constant time - O(1) - but if the array is 2D (n*n), then would this still hold true if i wanted to insert the same value into each array? let me explain a bit better, if i have …

Member Avatar for unclepauly
0
124
Member Avatar for unclepauly

if an algorithm takes a total time of T(log n + n^2), is this big O(log n + n^2) or simply big O(n^2) ?

Member Avatar for unclepauly
0
63