Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rpet
  • Order by date
  1. rpet

    Getting an IDE for Java Micro edition?

    Hi, MrPeds. I recommend to use Borland JBuilder 9. There are better IDEs around, but this one has very good J2ME support. The "Personal" edition is free. Download it at http://www.borland.com/jbuilder/personal/index.html Check the manufacturer web pages to get SDKs for their devices...
  2. rpet

    c++ simple hashing function help

    This one is from a sample by... Marc Weiss, I think. int hash( int key, int tableSize ) { if( key < 0 ) key = -key; return key % tableSize; }
  3. rpet

    Windows logon name?

    Read their values via API function GetEnvironmentVariable().
  4. rpet

    Windows logon name?

    You may use environment variables &quot;USERNAME&quot; and &quot;USERDOMAIN&quot;.
  5. rpet

    PC Speaker - problem with keybaord buffer overflow in my app

    Hello. How do you read the keyboard data? Buffered or immediate? ps: DirectX version?
  6. rpet

    question about std namespace

    I agree with IonFilipski. You should also avoid to use old and new stdlib header files in one project. And do not use 'using namespace' in header files.
  7. rpet

    compiling netcat/cryptcat

    > is there a way to tell based on the errors, other > than just knowing, that Wsock32.lib is the one that > contains those unresolved symbols? Yes. The error messages show you which symbols are undefined, e.g. &quot;_getsockname@12&quot;. In the MSDN you find a description of getsockname(). At...
  8. rpet

    compiling netcat/cryptcat

    Hi Matt. Add WSock32.Lib to the list of libraries used by the linker. (VC6: Project Settings > Link > Object/library modules) Alternatively, you may add the following statement to the source code: #pragma comment(lib, &quot;WSock32&quot;) It has the same effect.
  9. rpet

    Type conversion: char to LPCWSTR

    >I am still confused. Like I said above, the declaration is >correct and it DOES work. But that is as long as I use >only one of them. Like JOlesen already said: You have not allocated any space for your output buffer (...LPCW), so the behaviour of MultiByteToWideChar() is undefined. Your...
  10. rpet

    Direct Draw Help

    Do you have more than one SDK installed? When you say &quot; DirectDraw SDK examples&quot;, you mean the examples of the MS DirectX 8 SDK that deal with DirectDraw, don't you?
  11. rpet

    Splitting a complex program into DLLs

    I think Dlls won't help. Obviously your program parts interact a lot, so different people can never work completely independent. I recommend to reduce shared memory as much as you can, and use interface functions whereever possible. Next, I would use static libraries instead of Dlls. mingis is...
  12. rpet

    Guru needed! problems with static members &amp; inheritance

    I don't know if it is a good idea to let a base class operate on a derived class's member, but one workaround may look like this: #include <iostream> struct base { void f(); }; struct derived : public base { static int number; }; void base::f() { derived::number++; } int...
  13. rpet

    Window handle from Console App

    > Do you know why procAddr is zero?? I think your version of the library does not contain the procedure. I tested this on a NT4 workstation and got the same result. Unfortunately I cannot install the Platform SDK on this machine to verify if this helps. The kernel32.lib file that works for me...
  14. rpet

    Window handle from Console App

    >I use &quot;handle=GetDesktopWindow();&quot; and pass the >handle to a Service Routine that requires it. >The SR works as expected, but would die horribly >if I used NULL. It is not NULL, but you get the desktop window handle - not the console window handle. I don't know your SR. Maybe this...
  15. rpet

    Window handle from Console App

    This does not work. Try the following program: #include <windows.h> int main() { const int BUFSIZE = 0x80; TCHAR lpszBuffer[BUFSIZE] = {0}; GetWindowText(GetDesktopWindow(), lpszBuffer, BUFSIZE-1); OutputDebugString(lpszBuffer); return 0; } The window title is empty because...
  16. rpet

    CoCreateGUID() prototype + definition

    Argh! I need to go on vacation. It's urgent! ;-) Thank you hcexi.
  17. rpet

    CoCreateGUID() prototype + definition

    Hello all. Could someone please tell me what it takes to use function CoCreateGUID()? According to the MSDN the function is prototyped in objbase.h and defined in ole32.lib. That's obviously correct but whenI try to use this function I get error C2065 ('CoCreateGUID' undeclared identifier)...
  18. rpet

    Searching and comparing in a structure

    What's the problem with your program?
  19. rpet

    cannot connect to db in debug mode

    The error checking is incomplete. If the SQLConnect() return value _is_ SQL_SUCCESS_WITH_INFO you should get the SQL_STATE to see what went wrong.
  20. rpet

    Window handle from Console App

    I guess you need to install the MS Platform SDK. Tomorrow I will test it on a Windows NT workstation (without the SDK), then I know it for sure.

Part and Inventory Search

Back
Top