OK, I've read everything I could find about this loader lock exception: DLL <name>.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Just turning off the loader lock exception in the managaged debugging assistants doesn't work (my real application then hangs), and all the work-arounds are for doing things in C++ that I can't do in VB (like setting linker options). So, can anyone tell me how to make this simple blank form (with two additional lines of code in the constructor) avoid a loaderlock execption under VS2008? (If I know what to do to fix this toy example, I can probably fix my real app.)
I'm using an AutoDesk Inventor View API (dont think it matters for this question) placed on my form. I can call files and have them open without issue, only when I open assemblies (drawing files) I get this error:
"LoaderLock was : Attempting managed execution inside OS Loader Lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
I dont expect anyone to know much about the API, however I assume this is a common error.
I developed a simple ASP.NET app, it was working fine, but now I can't get user info; I am getting this message:The remote server returned an error: (417) Expectation failed.
and here's the code I'm using: Dim FBUser As Facebook.Schema.user = Nothing Dim connectSession As Facebook.Session.ConnectSession
I've got a program which starts with welcome screen "Enter the number of the random variables X" and this number refers to the columns. If it is entered 5 => a DataGridView will be created with 5 columns and 2 rows (first one is for random variable entered by the user, and the second is for probability). For example:I have to multiply x1 with probability p1, value x2 with probability p2, and so on. So EX = x1*p1 + x2*p2 +... Here comes the question - how to multiply and then add them?There are only 2 rows, that's how much I need :I've enabled only 2 rows, that's how much I must have for this program:
Const allowedRows As Integer = 2 Private Sub DataGridView1_UserAddedRow(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) Handles DataGridView1.UserAddedRow
i'm working on a simple 3D CAD to create complex 3D objects. This application uses:
1. Direct3D to render the objects 2.The methods contained in the Mesh class (such as Mesh.Box(...)) to create them 3.The Matrix class to apply some basic transformations (such as Translation or Rotation)
My issue is to do a boolean subtraction of a Mesh to another one to create a more complex Mesh, for example a Mesh with holes.
SI like doing random things like 3D objects inside a windows form. With that said, I'm creating an application that will, eventually, write the code for me, after I do it myself visually.If you run the app it will make some more sense I guess.Now, to rotate the cubes, I'm using
now I do not want the world to rotate, just my individual cubes.Here's an example of me referring to my cube in action
If howmanycubes >= 1 Then ' vb2 = New VertexBuffer(GetType(CustomVertex.PositionNormalColored), 36, d, Usage.Dynamic And Usage.WriteOnly, CustomVertex.PositionColored.Format, Pool.Default)
[code]....
how to apply textures to the cube.instructions:When running the program, type in values on right side and click create cube.before you click create cube again, those same text boxes will adjust your current cube.Then when you click create new, it places another cube ontop of your current cube, so you'll need to give it new values.Not much validation is going on so some bad values will cause crashes.
How to solved error Unable to cast object of type 'System.Int32' to type 'Microsoft.DirectX.Direct3D.VertexShader'
We want to case ''System.Int32' value into 'Microsoft.DirectX.Direct3D.VertexShader' I tried with CType but not working.Also tried mD3DDevice.VertexShader = CObj(D3DFVF_CUSTOMVERTEX_BOX)
this error seems to be an error on Microsoft's part with Windows 7 and DirectX9. DirectX11 on Windows 7 should be able to run DirectX9, but it says it can't find the assembly called "Microsoft.DirectX.Direct3D.dll". I know for a fact that he can play Assasins Creed on Windows 7 which uses DirectX9.. Why does that game work but not my application? I'm using VB.NET btw.
Im currently working my way through understanding direct3D with visual basic for windows mobile. So far I have managed to write a fairly decent engine that allows me to create and transform any number of 3D primitives and 2D sprites. However I cant seem to figure out how to get Direct3D to apply any sort of shading to my meshes. Regardless of what angle they are to the camera, or their position in 3D space, they remain a solid flat color on every single polygon of the mesh.
Is there any way to avoid UnauthorizedAccessException, i get it every time when I try to do this:[code]Is there any way to make that script read-write?
Until asking a question on here I never considered (enums) to be a "bad thing." For those out there that consider them not to be best practice, what are some approachs/patterns for avoiding their use in code?
Edit:
public Enum SomeStatus Approved = 1 Denied = 2 Pending =3 end Enum
I have following code that is generating random no. between 1 to 10. This is working fine. But, I do not want doubling in combobox (cmbRnd is my combo box). How can I avoid it?
Private Sub cmdRnd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRnd.Click Dim random As New Random(), i As Integer = 1
I am trying to check whether file exists or not. if not create and write something into it.The file is getting created but not updating and getting error message says it is being used by another processCode snippet:
Public shared sub MyXml() If Not System.IO.File.Exists("configfile.xml") Then Dim writer As New System.Xml.XmlTextWriter(fullPath.ToString + "configfile.xml", Nothing)
I am doing an activation server which will enable users to activate their software. The problem is that they own the public key.. the verification method needs the public key to check signature of the license file. My concern is that someone could generate their own license file using two key (public and private) and then change the public key on the client which would spoof his current license.
Is there any way of avoiding this ? Where should the public key be stored ? You have to take into consideration that the checkup is done on client and the signature is created on server.
I would like to ask about how to code datetime in CONSOLE vb.net. I already got the format but my problem is after I inputted another data today to the database. In this image,my data retrieval was error. The ID (1,2,3,4,5,6)should be jan 2. Unfortunately, the output was today after Ive put new data to the database. I was confused on how to code to avoid changing the date.
I'm trying to introduce delay to my code so that it would read in the noise or garbage data. I'm receiving the data from RFID to pic thru RS232.Is there any simple delay that i can use? I seriously don't understand threading.
I have been trying to use sockets in VB.NET and once I cannot understand how to avoid a null reference. [code] I have tried introducing sock as 'New Socket', but this gives me 'Overload resolution failed because no accessible New can accept this number of arguments'.I also cannot simply add '= Nothing' onto the end of my declaration since this still gives a null reference.
i have coded as below but once the record deleted and when the application write to text file again it gives an error says index was outside the bounds of the array any solution?
Dim stream As New IO.StreamWriter("C:Documents and SettingsAdministratorDesktopBill PaymentBillPaymentRecords.txt", False) stream.WriteLine("") stream.Close()
I have been programming for alot of time. Generally i program in some languages like PHP, ASP.net, Java, JavaScript and others. In all languages i have to use alot of if else statments . Like if value= 10 then ... if i review my code then i find alot of if conditions. So i would like to minimise them but how not sure. one point was using classes somewhat minimised but still they are more... like task, cat, sec and type:
I have a matrix for example (10 x 10) which represents 10 nodes. The matrix called MyMat(9,9) The rows of this matrix represent the source node (From Node) and the columns represents target node (To Node). It has 14 links which are randomly distributed. The non zero values represent the connections between nodes.
I am making an application in which number of pictureboxes created at runtime but they do not overlap to each other. I wrote a code bt its only for two pictureboxes.How can i do that for number of pictureboxes..
Public Class Form1 Dim pic1, pic2 As Rectangle Dim drag, iscollided As Boolean Dim mousex, mousey As Integer Private Sub pic_Mousemove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) [Code] .....
I need the user to choose one on a group of RadioButton controls. The problem is that on form load, one RadioButton is automatically selected. I does not want one selected, unless the user checks it, but cannot find how to disable automatic selection.