Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About UriKiller

  • Rank

Personal Information

  • Interests
  1. I do not update the texture every frame, using the GDI functions. But I do draw on the texure occasionaly (this is a GUI engine, so each change inside the window is such an occasion) using GDI functions such as: Brush functions: FillRect() Text Functions: DrawText(), GetTextExtentPoint32(). Pen/Line functions: MoveToEx, LineTo. And maybe more. I know that some of these may be replaced with D3DX helper classes, but if I would want to replace all these functions with D3D/D3DX ones, I would have to reimplement many stuff. I also find it simpler to use the GDI functions, and most of them aren't slower when drawing into memory textures.
  2. Hello, I am trying to draw into a texture using GDI. This is done by getting the texture's surface and then calling surface->GetDC(). The only problem is, that this cannot be done for textures that contain alpha channels. Even if I create a temporary "GDI" texture, which has no alpha channel, and then copy from it into the real texture, the alpha values will be destroyed (set to 0). There are two solutions I can think of, and both seem very inefficient: 1) update the alpha values manually, by locking the texture. 2) Create an alpha-only texture (i.e. D3DFMT_A8) that contains the alpha map of the texture, and configure the texture stage states so that the alpha values will be taken from there. I would appreciate any other idea to solve this problem. Thanks, Uri.
  3. Thanks, everything works now.
  4. Wow, Nice guess! thank you!! I'm almost sure that it is what you said, because on other computers I cannot decrypt using the public key. I still haven't tried to explicitly delete the keys, what function does that?
  5. Ok sorry for not giving the details, I just assumed that this is a common mistake so you would immediately guess why this happens. 1) In the Key Generator I call: CryptAcquireContext (&g_hCryptProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0) CryptGenKey (g_hCryptProv, ENCRYPT_ALGORITHM, (0x0400 << 16) | CRYPT_EXPORTABLE, &hKey) CryptExportKey (hKey, NULL, PUBLICKEYBLOB, 0, pudata, &pukeylen) CryptExportKey (hKey, NULL, PRIVATEKEYBLOB, 0, prdata, &prkeylen) And then save the files. 2) In the encrypter I call: CryptAcquireContext (&g_hCryptProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0) //Public key is file loaded into keydata, keylen. CryptImportKey (g_hCryptProv, keydata, keylen, 0, 0, &hKey) //It's for encrypting just one block. so nbytes = 117, outblokclen = 128. CryptEncrypt (hKey, NULL, true, 0, data, &nbytes, outblocklen); 3) In the decrypter I call: CryptAcquireContext (&g_hCryptProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0) //Private key is loaded into keydata, keylen. If public key is loaded instead, //everything will still work. That's the problem... CryptImportKey (g_hCryptProv, keydata, keylen, 0, 0, &hKey) //It's for decrypting just one block. So dec so nbytes = 128, and becomes 117 after the function returns. CryptDecrypt (hKey, NULL, true, 0, data, &nbytes) *There are no errors returned in any of the calls to the Crypt functions in either of the programs. But when I import the public key blob, the decryption works perfectly. Thanks again for any help.
  6. Hello, I'm new to the whole encrypting system.. I started to read in MSDN about how to use CryptAPI and after about a week I finished a program that generates a public/private key pair, a program that encrypts a file using the public key, and another that decrypts using the private key. Everything worked fine until: I accidently tried to decrypt the file with the public key and it succeeded. This shocked me.. I am using the Microsoft basic cryptographic provider. I use the algorithm CALG_RSA_KEYX with length 1024, and provider type PROV_RSA_FULL. Please help me to figure this out, I cannot use these programs now that I found this horrible mistake. Thank you if you solve it! Uri.
  7. UriKiller

    HTTP client problem

    Oh, yeah it makes sense. I do not handle unicode meanwhile at all. The other chars though, aren't just unknown signs, they appear just a couple of times in the html file, and also as 3 hex letters. So it is still a bit weird
  8. Hello, I am making a simple HTTP client. I connect to a server and request an html file (with 'GET' command) and the server replies with 'OK' and sends the file. The problem is, sometimes the server sends some weird character combinations (like f0b, ffb) before and inside the html file and when I use 'View Source' of the same page with a real browser, it knows to ignore these characters. For example, here is how the html file begins: f0b <!DOCTYPE HTML PUBLIC and inside the file itself there are lots of 'ffb's, which do not appear when I download the page using a normal browser. Obviously, When I save this data (downloaded by my client) into a .html file and open it with a real browser, these characters just appear as annoying text in the page. If anyone knows what these characterss are for, I would be thankfull.
  9. YOU don't have to do anything, Direct3D will know how to turn the values from 0-255 to 0-1. But if you want to make some calculations by urself (like when using shaders) you will get the values as floats between 0-1 anyway, so you don't need to make any conversions. However, if you really need to work with these values completely manually, I would suggest to work only with integers and only convert the final result into float. By the way, I don't think that this is called normalizing, because you do it only on the single value (the alpha), and not on a vector.
  10. UriKiller

    Internal Compiler Error

    I did see the newer compilers many times. All I remember is that the compile took more time, and except the different enviroment all was the same. About templates, I really don't want to get into metaprogramming, at least not in the project type that I am working on now. I don't use STL either. But in VC8 you say that STL is faster? It will always be slower than making things yourself.
  11. UriKiller

    Internal Compiler Error

    I don't know what you mean when you say it doesn't have support for template. Everything I ever needed with templates, worked fine. What scoping issues are you talking about? It has some inaccuracies sometimes with name scopes but its very easy to adjust the code. I don't know about the optimizations but in release mode I think everything is close to maximumly optimized. Anyway, All those issues you say didn't stop companies from creating massive programs or games using this version, so I can't find a situation in which there will be a practicle side to these issues you say.
  12. UriKiller

    Internal Compiler Error

    Quote: Wow - I just realised I haven't done a format&reinstall of my windows since... a year an a half now... I'm quite under impression that my windows still works :P I would say the same thing, If my windows hadn't suddenly refused to start up, after I accidently pushed the reset button with my thumb...
  13. UriKiller

    Internal Compiler Error

    Thanks for the fast replies. What I wanted to know is what caused those errors. thanks jpetrie. I did know that the code was illegal but the compiler should know to handle illegal code and inform the programmer of the syntax errors he has made. Imagine it would crash each time the code had an error... Quote: VC++6 is a horrendously poor C++ compiler. One error like that would make this compiler so horrible? And besides, I just like the enviroment and I'm used to it already for a long time. Quote: released before the language itself was standardized. 99% of it is according to the standard and the remaining "non-standards" are things that are probably rarely used anyway. Quote: the Express editions of VS are free and vastly improved. If I get convinced that I need the better editions, I will definately purchase the best one I can. EDIT: Quote: It is downright confusing to me that people still find copies of VC6 to work on. These same people aren't using Windows 95 or Photoshop 5.0. Where did they get it? I have the CD from about 1998, the time it was released. I kept installing it on every new Computer I bought, each couple of years. Same goes for my MSDN, which is very "usefull" for learning Win32 API (It barely knows what is HWND).
  14. Microsoft Visual C++ 6.0 (maybe in others too) ------------------------- Internal Compiler Error means that the compiler had some type of runtime error while trying to parse and compile my code? It also sais at what line of what file the error occured. I don't understand this - how does it know what line in the file caused the error, and how is possible that this file is also a CPP file? The compiler is written in CPP? By the way, I tried to find the shortest expression that would cause this error. Here it is: class c{}c::c{ Or in a nicer form: class c { }; c::c { It also happens if the constructor IS declared in the class.
  15. UriKiller

    Getting Started

    Do you mean you are using the 'Realtime Game Creation' feature of Blender? Because generally Blender is used for creating 3D content to be used in games, it doesn't make the game itself.
  • 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!