Use SpInProcRecoContext Instead Of The Shared One?

Jun 12, 2011

I'm working on a voice recognition project in VS 2010. I'm trying to use SpInProcRecoContext instead of the shared one. However, I'm running into issue getting my program to recognize when I'm speaking. When I use the shared one I can make it work just fine. But with InProc it never picks up my voice. Right now it should just take what you say and put it into a text box. Here's my

VB

Option Explicit On 'Default ImportsImports SystemImports System.DataImports System.DeploymentImports System.DrawingImports System.Windows.FormsImports System.Xml 'Custom ImportsImports SpeechLibImports SIMPLEAUDIOLib Public Class frmMain 'Dimension variables Dim WithEvents RecoContext As SpInProcRecoContext 'The Main Recognition Object Used throughout the whole program.[code].....

View 7 Replies


ADVERTISEMENT

.net - Why Can't Call Private Shared Methods From A Public Shared Method

Aug 25, 2011

I have a class like this:

[Code]...

It works, when I make getBar methods public, but I don't want to expose these unneccessarily. Why I can't call private shared methods from a public one in the same class is over my head. I'm using .net framework 4.0 in a web application.

View 1 Replies

Asp.net - Public Shared Variable Shared Between Users?

Mar 30, 2012

I've taken over the maintenance of the website (ASP.NET VB) and on one particular page I noticed the below code

Inherits System.Web.UI.Page
Public Shared UserNumber As String
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

[Code]....

My question is whether the variable UserNumber can be accessed or changed by any other user than the current one?

View 2 Replies

Shared Method Not Calling Shared Constructor

Aug 12, 2009

Given in the following language specification, for me at least, calling Db.Foobar() [In the following code] does not indeed call off to the Shared Constructors of the base classes. I am curious as to a) is this my own fault for doing something wrong or b) is this an error in the language specification[code]...

View 2 Replies

Create A "shared" Variable That Is Shared With All Instances Of A Class?

Jan 14, 2011

I seem to be drawing a blank. I'd like to create a "shared" variable that is shared with all instances of a class but not classes that inherit from it. For example.Class A: Shared list As New List(Of String): list.Add("A")

Class B Inherits A: list.Add("B")Class C Inherits B: list.Add("C")The end result I'd like is that any instance of A has just A in the list. Any instance of B has A and B in the list. Any instance of C has A, B, and C in the list. I can accomplish it by creating Instance variables, but I have to construct the list for each instance of a class. I'd like to construct it once for a specific point in the Hierarchy and then share it accross other instances of that class.

View 12 Replies

Use Derived Class Shared Variables In Shared Methods Of Base Class?

Jun 4, 2010

I am trying to add shared members in derived classes and use that values in base classes...

I have base

class DBLayer
public shared function GetDetail(byval UIN as integer)
dim StrSql = string.format("select * from {0} where uin = {1}", tablename, uin)
end function
end class

[Code]..

currently there is error using the tablename variable of derived class in base class but i want to use it i dun know other techniques if other solutions are better then u can post it or u can say how can i make it work? confused...

View 2 Replies

Difference Between Shared Events And Non-shared Events?

Dec 16, 2009

is there a difference between shared events and non-shared events?

Private Shared Event EVENT_something_changed()
Private Sub SUB_handles_something_changed() Handles Me.EVENT_something_changed
End Sub

no errors with this code, but how is Me possible since the Event is shared. it seems like there's no errors between switching shared with un-shared and switching Me with Myclass, all 4 combinations seem to work, isn't that weird

View 18 Replies

C# - Centralised/shared COM DLL?

Jun 5, 2010

We have a system that makes a use of 3rd party COM DLL written in vba We have a centralised web application and 1-50 client machines that must reference that COM DLL in order to use our centralised web application.

The COM DLL is going to be updated rapidly in the future, which means that it has to be re-installed on every machine manually.Is it possible to centralise this COM DLL somwhere on the network? Is there any other alternatives? Otherwise the maintenance overhead will be huge.

View 2 Replies

Create & Use Shared Dll?

Dec 31, 2011

I've created a Class Library using vb.net, the thing is that several applications should use this file.

I'm using Inno setup, and I'm declaring the dll file to be shared.

in the client app i've added refrence to the dll and set "Copy Local" to false.

Now if i put the exe file (the client app) in the same folder with the dll everything works correctly, but once I move the exe or use another application that should use the so called shared dll the assembly cannot be loaded because the system cannot find him ("IOFileNotFoundException")

View 2 Replies

Use Of Shared Variable In .net?

Mar 5, 2009

What is the use of shared variable in vb.net?

View 3 Replies

.net - How To SyncLock A Shared Integer

May 28, 2012

I am pretty new to multi-threading in general and I would like to know how can I lock a shared integer variable to not be accessed by other threads while it is read/updated by an other thread.When I try do do SyncLock myInteger, I get that error : Error 6 'SyncLock' operand cannot be of type 'Integer' because 'Integer' is not a reference type.

Here a simplified example of what I mean

Private Shared myInteger As Integer
Private Sub MySub()
SyncLock myInteger ' This does not work
' read/write a new value to myInteger
End SyncLock
End Sub

MySub is called by multiple instances of the class, and running in multiple threads?

View 1 Replies

.net - MustInherit And Shared Functions?

Jun 6, 2009

I'm looking at a VB.NET class (that I didn't write) that is declared "MustInherit" (abstract in C#, I believe) that has three methods, all of which are defined as "shared" (static in C#). There are no properties or fields in the class - only the three methods. From an OO perspective, does this make any sense?

My thinking is no, because by making it MustInherit, you're essentially saying you can't create an instance of this class - you must inherit from it and create an instance of the derived class. But since all the methods are shared, you'll never actually create an instance of the parent class anyway, so the "MustInherit" does no good. You might as well not mark it MustInherit and just inherit from it whenever you want.

View 3 Replies

.net - Shared Variables Among Subclasses?

Jan 18, 2011

I have a problem with inherited classes. Have a look at the following VB.NET 2.0 / VS 2005 code:

MustInherit Class templateclass
Public Shared x As String
End Class
Class child1

[code]....

The templateclass has a shared variable x which is of course inherited by the child classes. But I wonder that all child classes share only one x! Until now I thought that shared variables are only shared among the instances of a class, not among all childs. This is very annoying because I have a base class which I need in two slightly different versions and they should not "share the shared" variables. And because the classes have a lot of shared variables, shadowing each in the childs would be very..

View 1 Replies

.net :: Shared Folder Permission?

Jan 12, 2010

I use this code to share folder:

Public Sub Share()
Dim managementClass As New ManagementClass("Win32_Share")
Dim inParams As ManagementBaseObject = managementClass.GetMethodParameters("Create")

[code].....

View 1 Replies

Accessing The Shared Function?

Mar 1, 2011

i have a function that i have in my data access class now i want to access it then declare and assign parameters and then insert data into database?

'1
'the function
Public Shared Function InsertNewRecord(ByVal myStoredProcedure As String) As Boolean
Dim conn As New SqlConnection

[code]....

View 4 Replies

C# - Shared / Static Variable Should Be Nothing?

Jan 6, 2011

I have the following code:
Public Class TestClass
Public Sub Main()
If theGlobal IsNot Nothing Then Throw New Exception("What gives!")
End Sub
Private Shared theGlobal As Object = Nothing
[Code] .....
Why is theGlobal object NOT Nothing?

View 2 Replies

Can A Shared Method Be Multithreaded

Feb 28, 2012

As the question states, can a shared method of an object be multithreaded? I don't quite having threading down in my skillset, otherwise I would test myself. On the other hand, I am involved in designing class that could be part of a multithreaded application in VB.Net.

View 3 Replies

Create A Shared IEqualityComparer?

Jan 20, 2012

I'm doing some LINQ which requires a custom comparer, so I created a new class implementing IEqualityComparer. However, when I use it, I have to create an instance of it each time.

Dim oldListOnly = oldList.Except(newList, New MyEqualityComparer)
Dim newListOnly = newList.Except(oldList, New MyEqualityComparer)

I may be misunderstanding how .NET works, but it seems wasteful to create a new comparer each time. I really just want one instance (the equivalent of static in C++/C#).So I tried creating a "static" class, which in vb.net is a module. But got an 'Implements' not valid in Modules error.I then tried making the Equals and GetHashCode function shared methods on my class, but got this error: Methods that implement interface members cannot be declared 'Shared'.how to accomplish my goal here?

View 3 Replies

Getting Information From Non-shared Object?

Mar 9, 2011

I get an error when I declare an object NOT-shared in a subclass. I can not make this object (glNR) shared.Is there an other way?

[Code]...

View 5 Replies

How To Dispose Shared Variable

Apr 12, 2011

How to dispose the shared variable in vb.net.i am using shared object of Asterisk.NET Manager Variable, i assigned it in form load and i dispose it in main form closing, My problem is after closing the application, application.exe keeps live in task manager, if i not initializing the shared object in form load there is no problem,[code]

View 3 Replies

IDE :: Intellesense Shared Members?

Jun 22, 2010

Why does intellesense show shared members? e.g:Dim x as doublex.epsi 'Epsilon will show up as a valid member in intellesenseIs there a way to change this behavior?

View 1 Replies

Is Shared ReadOnly Lazyloaded

Feb 11, 2011

I was wondering when I write

Shared ReadOnly Variable As DataType = New DataType()
Or alternatively
Shared ReadOnly Variable As New DataType()

[code].....

View 12 Replies

Namespaces And Shared Functions?

Jul 31, 2009

I am working with VB.Net and am kinda new. I was wondering, if my asp.net project has a lot of shared functions, can I put them all into one Namespace? Do I have to put them into a class?

View 7 Replies

PHP - Shared Database Desktop / Web App

Jul 19, 2011

We have 2 applications: web-based (PHP) and Desktop (VB) sharing the same database (Hostgator). Our web app has a fast access to the database (it's localhost). Our desktop application suffers with slow access and frequent timeouts. Should we share a database?

View 4 Replies

Public Shared Variable Ref?

Jun 29, 2011

I have an arraylist in a user form (Mainform) that I would like to be able to share among multiple forms and edit the contents. Using the Public Shared method I have been able to view and even edit the arraylist, but it does not seem to be changing it back on the main form. I can give more detail if needed.

View 9 Replies

Put Onto The Shared Folder Of Every System?

Jun 1, 2011

creating ones own folder structure through tree view similar to the windows explorer for a windows application,will the application work on all the systems over the network?? will the files added to the folders (of the treeview in the application),visible to all.or would the exe be required to be put onto the shared folder of every system?? what will be the exact architechture???

View 9 Replies

Set Permissions On Shared Folders?

May 21, 2010

Is there a .NET way of setting permissions on shared folders?

I would have thought there was a more .NET compliant method than that!

View 34 Replies

Shared Functions And Subs?

May 21, 2009

I was wondering how to implement a vb script file with functions and subs that can be used in all code pages of a project. Similar to the old VB 6 bas files.

View 2 Replies

Shared Hashtable Between Different Apps?

Nov 3, 2010

I currently have a ASP.NET Website and a Windows Service doing some work together.It consists in running some processes either using scheduling or on-demand requests.Basically before i had the windows service i used a Shared Hashtable to register all the on-demand requests and avoid duplicate requests for the same ID. I tought i could use the same hashtable to add the scheduled requests also... but somehow they are being created in separated hashtable's.I think its because the windows service uses a diferent instance of the website.

PS: in the hashtable i save full class objects for future reference so the solution must be able to achieve the same.

View 3 Replies

Shared Interface And ReaderWriterLockSlim?

Aug 27, 2009

I am using the suggested method from the log4net examples so at the top of said class I have: Private Shared ReadOnly log As log4net.ILog = og4net.LogManager.GetLogger(decType)And since the class involves multiple threads interacting with it, I have a ReaderWriterLockSlim instance that I use to make sure I don't get into any race conditions with my variables. So to recap,if I want to make sure I'm practicing safe threading do I need to do something like this:

If Me.ReaderWriterLockSlim.TryEnterUpgradableReadLock(-1) Then
If log.IsWarnEnabled Then
If Me.ReaderWriterLockSlim.TryEnterWriteLock(-1) Then

[code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved