[.net] ref 0 as a structure?

Started by
1 comment, last by DrGUI 19 years, 7 months ago
DirectX uses that in D3DX's TextureLoader class, for the ref ImageInformation parameter, in a few of the overloads for FromFile. Of course, I realize that they do not want to duplicate the code, but I was unable to get 'ref ((Direct3D.ImageInformation) ref 0)' to compile. I got that code from Lutz Roeder's Reflector, a .net decompiler. I do not believe that section of code to be unsafe, but I wouldn't bet my life on it. Shall I just create a new (empty) structure and pass that in? I do not especially want to double my overloads for my texture restoration system. Thanks in advance!
Advertisement
actualy it looks to me like the lutz decompiler didnt interpret the ILasm so i dont think it would compile at all.
Quote:Original post by RenZimE
actualy it looks to me like the lutz decompiler didnt interpret the ILasm so i dont think it would compile at all.

It seems to work on everything else.
It definately works on my code and when I tried it on Direct3DX it certainly produced logical output.
Of course, it could be a flaw. Can't expect everything to be 1200% perfect.

This topic is closed to new replies.

Advertisement