Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

boyindie

@boyindie
About
Posts
100
Topics
47
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to return variable to VB.NET
    B boyindie

    Hi I have been writing this piece of code which will search for all the possible video capture devices on the machine using the Windows DirectShow API. But no matter what I do I can't get this block of code to return the list of devices in a suitable format back to my VB.NET code. I keep getting the error pInvoke Restriction:Can't return a variant. Is there away to convert possibly the variant to a char array, and return the array back to the vb.NET GUI? The code I have is as follows :

    extern "C" __declspec(dllexport) VARIANT __cdecl getDevice()
    {
    // Create the System Device Enumerator.
    hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
    CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
    reinterpret_cast<void**>(&pDevEnum));

    if (SUCCEEDED(hr))
    {
    	// Create an enumerator for the video capture category.
    	hr = pDevEnum->CreateClassEnumerator(
    		CLSID\_VideoInputDeviceCategory,
    		&pEnum, 0);
    }
    
    while (pEnum->Next(1, &pMoniker, NULL) == S\_OK)
    {
    	IPropertyBag \*pPropBag;
    	hr = pMoniker->BindToStorage(0, 0, IID\_IPropertyBag, 
    		(void\*\*)(&pPropBag));
    	if (FAILED(hr))
    	{
    		pMoniker->Release();
    		continue;  // Skip this one, maybe the next one will work.
    	} 
    	// Find the description or friendly name.
    	extern VARIANT varName;
    	VariantInit(&varName);
    	hr = pPropBag->Read(L"FriendlyName", &varName, 0);
    
    	pPropBag->Release();
    	pMoniker->Release();
    }
    return varName;
    

    }

    Any feedback would be greatly appreciated Cheers Boyindie

    C / C++ / MFC csharp data-structures beta-testing json

  • C++ directshow dll help
    B boyindie

    Hi I have been fighting with this for days moving from random error to random error. I am trying to write what is effectively a software driver for a decklink blackmagic capture card using the directshow api. The code I have here is basically the sample code from the MSDN website to get all the video devices on the system but I just seem to get errors everytime I try to compile this!

    #pragma once
    #include "stdafx.h"

    #define DllExport __declspec(dllexport)
    #pragma comment(lib,"Strmiids.lib")//Includes the directshow library

    class VideoCapture
    {
    //constructor
    public:
    VideoCapture(void);
    void getNames();
    void getDevice();
    void createFilter();

    public:
    ~VideoCapture(void);

    };

    // test.cpp : Defines the entry point for the DLL application.
    //
    #include "stdafx.h"
    #include "VideoCapture.h"
    #include "dshow.h"
    #include "Atlbase.h"
    #include "Atlcom.h"

    #ifdef _MANAGED
    #pragma managed(push, off)
    #endif

    BOOL APIENTRY DllMain( HMODULE hModule,
    DWORD ul_reason_for_call,
    LPVOID lpReserved
    )
    {
    return TRUE;
    }

    #ifdef _MANAGED
    #pragma managed(pop)
    #endif

    VideoCapture::VideoCapture(void)
    {
    }

    VideoCapture::~VideoCapture(void)
    {
    }
    ICreateDevEnum *pDevEnum;
    IEnumMoniker *pEnum =NULL;
    HWND hList;
    IMoniker *pMoniker = NULL;
    IFilterGraph *m_pGraph=NULL;
    VARIANT varName;
    IPropertyBag *pPropBag = NULL;
    HRESULT hr;

     \_\_declspec(dllexport) void \_\_cdecl getDevice()
    {
    hr = CoCreateInstance(CLSID\_SystemDeviceEnum, NULL,
    CLSCTX\_INPROC\_SERVER, IID\_ICreateDevEnum, 
    reinterpret\_cast<void\*\*>(&pDevEnum));
    if (SUCCEEDED(hr))
    {
    	// Create an enumerator for the video capture category.
    	hr = pDevEnum->CreateClassEnumerator(
        CLSID\_VideoInputDeviceCategory,
        &pEnum, 0);
    }
    

    }

    \_\_declspec(dllexport) void \_\_cdecl getNames()
    {
    	while (pEnum->Next(1, &pMoniker, NULL) == S\_OK)
    	{
    	 
    		hr = pMoniker->BindToStorage(0, 0, IID\_IPropertyBag, 
    		(void\*\*)(&pPropBag));
    		if (FAILED(hr))
    		 {
    			 pMoniker->Release();
    			continue;  // Skip this one, maybe the next one will work.
    		 } 
    			// Find the description or friendly name.
    			
    			VariantInit(&varName);
    			hr = pPropBag->Read(L"Description", &varName, 0);
    		   if (FAILED(hr))
    		    {
    				hr = pPropBag->Read(L"FriendlyName", &varName, 0);
    			}
    			if (SUCCEEDED(hr))
    			{
    				// Add it to the application's li
    
    C / C++ / MFC c++ help json question announcement

  • How to integrate VB.NET with C++
    B boyindie

    Hi I am in the process of adding video capture functionallity with the use of the DirectShow API. My program has been written in VB.NET, but due to compatibility issues I have been writing code in C++ so that I can fully access the directshow api. But I seem to have hit bit of a brickwall in attempting to integrate the code. I thought it was possible to be able add the c++ project into the VB.NET project, and be able to make function calls from the VB.NET GUI interface with the C++ code. Is this possible? Another option that I am now considering is exporting the c++ code as a DLL file and from there I can access the c++ as a library file? Although I would prefer my first suggestion if this is possible? Any suggestions would be greatly appreciated Cheers boyindie

    Visual Basic csharp c++ json tutorial

  • writing to console
    B boyindie

    hi I am using an openGL with C i am unsure on how to write to a console window using this useless programming language any help would be appreciated thanks boyindie

    Managed C++/CLI graphics game-dev help tutorial

  • Image loading
    B boyindie

    HI I was wondering if anyine could give me any advice on improving image loading speed I have an asp application which speaks to a mysql backend, which holds server locations of images which have been added to the application when i pull the images into a grid they load very slowly and u can initially watch them physically download onto ur screen. I was reading about possibly caching these images to help with loading, and another place i seen that u can load the images into another asp page, and link the asp image holder to the page? Any suggestions would be greatly appreciated, it also occasionally causes a server crash as it runs out of memory cheers boyindie

    ASP.NET performance css mysql sysadmin help

  • global.asax session help
    B boyindie

    I have got it working now but it doesn't allow null as its outdated, it will only allow a dbNull but i just set it session="" works jus as well

    .NET (Core and Framework) sysadmin help

  • global.asax session help
    B boyindie

    Hi i have a logging session which i use in the global.asax file which determines if the user is authenticated to the system i ahve it working within reason but if i try to access a page before logging in it will render page then will write my relogin page to the same page I want it to redirect to this page relogin page if the user isn't authenticated on the system, so that nothing is showing by the browser i have the following code

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
    ' Code that runs when a new session is started
    Session("loggedin") = "False"
    CheckLoggedIn()
    Session.Timeout = 20

    End Sub
    
    Sub Application\_OnPostRequestHandlerExecute()
        CheckLoggedIn()
    End Sub
    
    'Check that the user is logged in.
    Sub CheckLoggedIn()
        'If the user is not logged in and you are not currently on the Login Page.
        If InStr(Request.RawUrl, "default.aspx") Or InStr(Request.RawUrl, "passwordrecover") And Session("loggedin") = "null" Then
         
            
        ElseIf Session("Loggedin") = "False" Then
            server.transfer("relogin.aspx")
            
        ElseIf Session("Loggedin") = "True" Then
            
            
        End If
          
    End Sub
    
    Sub Session\_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when a session ends. 
        ' Note: The Session\_End event is raised only when the sessionstate mode
        ' is set to InProc in the Web.config file. If session mode is set to StateServer 
        ' or SQLServer, the event is not raised.
        Server.Transfer("relogin.aspx")
    
    End Sub
    

    I have also tryed using response.redirect, but this jus does the same in thing IE, and firefox will jus timeout everytime any help appreciated boyindie

    .NET (Core and Framework) sysadmin help

  • Emailing
    B boyindie

    Hi I am trying to setup an automated emailing in my asp.net applications, so that i can send out new passwords to users and also send out invoices once an order has been completed I have been looking around on the web, but I can't see much on the web to help do this Has anyone got any suggestions or links that would be helpful cheers boyindie

    .NET (Core and Framework) csharp asp-net help workspace

  • image url help
    B boyindie

    excellent cheers

    ASP.NET database sysadmin help

  • image url help
    B boyindie

    HI I am trying to hardcode a folder name into an image url, the below will work if i pass my value into the database, but that will cause problems later on when i need just the file name I am wanting to convert the above like somthing below, so that it will pull the correct image from the server,(below doesn't work) any help appreciated cheers boyindie

    ASP.NET database sysadmin help

  • webserver
    B boyindie

    I have sorted the problem I was tryin to add to a users table I am guessin that is a keyword or somthing in mySQL as i changed the table name to system_users and it works fine now cheers boyindie

    ASP.NET database question

  • webserver
    B boyindie

    Hi I am having problems with my asp page on my remote webserver Every time i try to use a stored procedure it returns saying a table doesn't exist If i put in a select query into the command the line the table is there has anyone got any ideas? cheers boyindie

    ASP.NET database question

  • driver help
    B boyindie

    -------------------------------------------------------------------------------- Hi I have been having horrible problems tryin to get connecter.net mysql driver to work on different machine, as my laptop has broken down I decided to try and use myodbc to discover it connected to my database but to only dissapoint me as it doesn't support stored procedures yet i have now managed to get hold of bytefx.mysqlclient driver but this still doesn't work I get the error message "client doesn't support authentication protocol requested by server;consider upgrading mysql client" so i am guessing this doesn't support mysql 5.0 the most up to date server available fromy mysql can anyone provide me with an drivers which will allow me to run asp.net to mysql, which will support stored procedures. I don't understand why the connector won't work I get the message "unable to connect to any specified mysql host" any help greatly appreciated cheers boyinde

    Database help csharp asp-net database mysql

  • Unable to connect to any specified mysql hosts
    B boyindie

    Hi I have had to move my work accross to a different machine as my laptop has decided to stop working! I have pulled the project accross and i have the same setup as before with mysql 5 and connector.net 1.0.9 But i just can't get .net to connect to mysql using this setup for some annoying reason as there is no difference between the setup of the two machines Does anyone have any suggestions my connection string takes the followin form connectionString = "Server=localhost; Database=ftp1; User ID=;Password=;Pooling=false;Connection Timeout=10;Protocol=socket;Port=3306;"

    .NET (Core and Framework) csharp database mysql sysadmin workspace

  • session variable preventing image retrieval
    B boyindie

    Hi I have been trying for ages to fill a table with images which have been returned from a database I removed my session that deals with log in status of the user, but when i removed it allowed all my images to be accessed and displayed in the table When the user is logged in the session variable is set to yes and it will timeout within 30 mins of inactivity can anyone tell me of a workaround so that i can still have this session and allow access to my images from this table? my global.asax file has the following code <%@ Application Language="VB" %> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup End Sub Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application shutdown End Sub Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error occurs End Sub Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when a new session is started Session("Loggedin") = "" Session.Timeout = 30 CheckLoggedIn() End Sub ' Called when the request has been process by the Request Handler and ' HttpSessionState is available [This is the key piece of code that forces ' the user is login check with each page request] Sub Application_OnPostRequestHandlerExecute() CheckLoggedIn() End Sub 'Check that the user is logged in. Sub CheckLoggedIn() 'If the user is not logged in and you are not currently on the Login Page. If Session("LoggedIn") = "" And InStr(Request.RawUrl, "userLogin.aspx") = 0 Then Server.Transfer("relogin.aspx?ReturnUrl=adminhome.aspx") End If End Sub Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when a session ends. ' Note: The Session_End event is raised only when the sessionstate mode ' is set to InProc in the Web.config file. If session mode is set to StateServer ' or SQLServer, the event is not raised. End Sub

    ASP.NET database sysadmin help question

  • databinder
    B boyindie

    i ahve done the above but it jus displays the red cross in the box i checked the source and it has filled the correct paths in the image urls any ideas?

    ASP.NET help sysadmin question

  • Rendering image in datagrid
    B boyindie

    Hi I have got a datagrid which, has an asp:image tag embedded through the columns, i have it pulling in the image url from a database. It does all this succesfully, but it jus won't render the images in the browser, it jus shows my alternative text. Is there somthing i am not doing? do i have to write a method for rendering these, if so how would i go about it? here is my code any help would be great, cheers Boyindie

    'Builds .net mysql connection and passes connection string into method Dim connection As New MySqlConnection(connectionString) 'Open connection to DB connection.Open() 'Create mySql command string for passing query or SPROC(Stored Procedure) Dim cmdString As New MySqlCommand 'Set Command to equal mySql connection, so can pass SQL query cmdString.Connection = connection 'Set command string to equal SPROC cmdString.CommandText = "sp_image" 'ONLY PLACE THIS IF SPROC, sets the command to a SPROC cmdString.CommandType = CommandType.StoredProcedure 'Create dataAdaptor for passing data between .net and mySQL Dim dataAdaptor As New MySqlDataAdapter 'Sets command object to datAdaptor dataAdaptor.SelectCommand = cmdString 'Creates a dataset which will be filled with data from 'dataAdaptor Dim ds As New DataSet dataAdaptor.Fill(ds) 'Creates Table which is filled data from dataset Dim dataTable As New DataTable dataTable = ds.Tables(0) 'Sets datagrids source to datatable dgImage.DataSource

    ASP.NET database csharp sharepoint mysql hardware

  • databinder
    B boyindie

    HI i am tryin to bind a image file name to an imageurl tag that is stored in a datagrid But i keep getting the error message: the server tag is not well formed, how would i alter this so its correct? " /> Any help greatly appreciated Cheers boyindie

    ASP.NET help sysadmin question

  • Datagrid image help
    B boyindie

    Hi I have built a datagrid which should populate a set of images whose urls are stored in my database, and set each of the images in my datagrid to there corresponding addresses I have a simple databind method which binds a dataset from a select query into my datagrid But i am not sure how to access the image address return values, so that I can populate the values thru my datagrid. here is my code this far any help much appreciated Cheers Boyindie 'Builds .net mysql connection and passes connection string into method Dim connection As New MySqlConnection(connectionString) 'Open connection to DB connection.Open() 'Create mySql command string for passing query or SPROC(Stored Procedure) Dim cmdString As New MySqlCommand 'Set Command to equal mySql connection, so can pass SQL query cmdString.Connection = connection 'Set command string to equal SPROC cmdString.CommandText = "sp_image" 'ONLY PLACE THIS IF SPROC, sets the command to a SPROC cmdString.CommandType = CommandType.StoredProcedure 'Create dataAdaptor for passing data between .net and mySQL Dim dataAdaptor As New MySqlDataAdapter 'Sets command object to datAdaptor dataAdaptor.SelectCommand = c

    .NET (Core and Framework) database csharp mysql help tutorial

  • connecting problem
    B boyindie

    The only notable difference is my laptop was runnin on microsoft xp pro and this runs on microsoft xp media centre

    ASP.NET help csharp database mysql
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups