Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

228 Neutral

About rmsimpson

  • Rank
  1. Make sure you're including winsock2.h instead of winsock.h Robert
  2. Other than for simple obfuscation, they aren't all that useful for games. On Windows, it'd require NTFS. If the hapless user moved the file from NTFS to FAT32 and back again, the stream would be gone. If they copied the file via FTP or out to a non-Windows network, the alternate stream would be lost as well. They might be good for storing state information or saved games, but don't expect a hacker to be thwarted by it for more than a few minutes (if that). Robert
  3. rmsimpson

    Problem in #Import (VC++)

    Two things: 1. Make sure Encryption.DLL is registered on the system. 2. Modify your CreateInstance so you record the HRESULT, then lookup the HRESULT online or on MSDN to see what it means. If that doesn't solve the problem, post the HRESULT of your CreateInstance() call and we can help you further. Robert
  4. Ok the only reason you'd need to make a combobox readonly is if you have to have an editable combobox (with an edit box). Ordinarily you can just configure the combobox to be a drop-list (CBS_DROPDOWNLIST style), and then the user can't edit it. However, if you need to be able to display a default entry that doesn't appear in the drop-list, and you need it to be readonly, you can send a CB_GETCOMBOBOXINFO message to the combo, which returns a COMBOBOXINFO struct which includes the HWND of the edit box for the combo. You can then send an EM_SETREADONLY messsage to the edit box and now the user can see but not edit the contents. Robert
  5. rmsimpson

    LoadLibrary from Memory?

    Writing your own loader is a daunting task. You'll have to memory map the file, read the NT headers, stitch together the imported DLL references, fixup any relocations, and lots and lots of stuff. It would be really cool to be able to do this, though. Robert
  6. You'll get that error when the name of a column or table is not recognized in Jet. Jet will assume its a parameter name. Make sure the table "login" exists and the column "username" is in that table.
  7. If you merely link with the riched20.lib, and don't make any richedit-exported functions, then the linker will optimize the library out of your build. You need to call LoadLibrary() and deliberately load the version you want in order for it to work properly. You can use the EM_LIMITTEXT message to limit the number of characters a user can enter into a textbox. It should work with regular textboxes as well as rich textboxes. Robert
  8. You have to use OleDbConnection and OleDbCommand. The SqlClient namespace is for SQL Server only. Jet is implemented in an OleDb Provider. Robert
  9. rmsimpson


    In a nutshell, you call SHGetFileInfo() to get the system imagelist index, then call SHGetImageList() to get the extra-large imagelist, then you can get the 48x48 icon from that imagelist. Only works on XP and above, though. Fortunately for me, rather than wade through interop, someone already wrote it up: Getting the icons for a file, including the big icons Robert
  10. rmsimpson


    One more thing .... does it have to run on Windows versions older than XP? Robert
  11. rmsimpson


    Hold up ... there's easy and there's hard. Do you want easy -- get the first icon in an executable's resource in 48x48 mode? Or do you want hard -- get the same icon Explorer shows for a given file regardless of filetype, in 48x48 mode? And does it have to be C#? I cringe every time I have to write interop code especially when it uses a lot of interfaces. I could probably whip something up in no time in C++. Robert
  12. rmsimpson


    Quote:Original post by f8k8 If you set your explorer view to either thumbnails or tiles, the icons are actually 48x48 images. That's the icon I want to get. Just setting the size of the image list to 48x48 results in the 32x32 image being scaled horribly. What I really want is a method of extracting the 48x48 icon from an exe file. Ah ha! Now we're getting somewhere. I'll get back to you on that. What if the file doesn't have a 48x48 icon?
  13. rmsimpson


    Adding Application.EnableVisualstyles() in Main() solved the alpha transparency problem, too. Robert
  14. rmsimpson


    I threw a quick C# Windows app together to test this. I added a ListView to the form, and an ImageList. I assigned the LargeImageList property of the ListView to the ImageList. I then set the ImageList's size to 32x32, and the bit-depth to 32bit. I then copied and pasted your code over and modified it to load the icon for notepad.exe. The icon was fetched and the entry added to the listview. What I got was a non alpha-blended icon, but one that otherwise looked proper. Robert
  15. rmsimpson


    This is COM we're talking about. Throw all this talk of base classes and derived classes out the window. If you have an interface pointer and want to find out if it supports another interface, just call QueryInterface and be done with it. Lets assume you have this object already: IDirectXFileObject *pObject = (some pointer to an object); If you want to find out of that object supports IDirectXFileData, just do this: IDirectXFileData *pFileData; HRESULT hr = pObject->QueryInterface(__uuidof(IDirectXFileData), (void **)&pFileData); if (SUCCEEDED(hr)) { // do something with pFileData // // When done, release it pFileData->Release(); } Forget about how QueryInterface works, and forget about whether or not an object inherits from or derives from a given interface. The only time you need to worry about that is if you are implementing a COM object.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!