C# :: Detect And Disable Network Cards

May 23, 2012

I have an application in c# that i don't want it to connect to the internet in a virtual environment, like virtualbox, vmware virtual pc and so on. Therefore i though that disabling the virtual network card inside the virtual machine would be a good idea.

View 3 Replies


ADVERTISEMENT

C :: Disable Interrupt In ARM M0 Program

May 6, 2014

How do i disable the interrupt in this ARM M0 univesity design start program? The design is made for the M0 and echos an inputted char as an integer, it is part of a larger piece of code (which is ommitted for simplicity).Can i do it in the main program(attached) or will i have to edit the assembler code.

Code:

// Cortex-M0 DesignStart C program example
#include <stdio.h>
#include <time.h>
#include <rt_misc.h>
#include <stdlib.h>
}

[code]....

View 2 Replies View Related

C# :: How To Disable And Enable LAN Connection In WPF

Jun 22, 2014

i have tried to search on the Internet but haven't found a suitable result that links in with what I want to do, that is to creation a WPF application and when you press a enable button it will enable the LAN and when I click the disable button it will disable the LAN until i click the enable button again. Now I know how to creation a WPF and the buttons, but how would I do the disabling LAN and enabling LAN?

By LAN i mean just the networking adapters, so that the PC cannot connect to a router and then the Internet.

View 14 Replies View Related

Visual C++ :: How To Disable Optimization

Dec 27, 2014

I want to disable optimization in Visual C++ 2010. In gcc on Linux I could just use the -O0 switch, but in Visual C++ 2010 there are two categories of optimizations, one in the C/C++ pane and the other in the Linker pane:

Attachment 33229

So what settings should I choose to make sure that no optimization is being performed?

View 2 Replies View Related

C++ :: Enable / Disable Menu Item

Nov 19, 2013

I have ploughed through the exchanges in all the forums, yet I still cannot make it work. The following is a tiny Code::Blocks program, written to isolate the problem:

// resource.h
#define IDR_MYMENU101
#define ID_FILE 102
#define ID_DISABLE103
#define ID_ENABLE 104
#define ID_MESSAGE105
#define ID_EXIT106

[code].....

case ID_ENABLE is similar to case ID_DISABLE above, and neither works. case ID_MESSAGE and case ID_EXIT both works as expected.I have tinkered with EnableMenuItem(), but without success.

View 8 Replies View Related

C Sharp :: How To Disable Selection Of 1st Row In DataGridView

May 3, 2012

how to disable selection of 1'st row in dataGridView.

I made it select some other row, but even so when u try to move with arrows on keyboard it'll select 2'nd row(cause 1'st row was selected initially and you can see it's selected on RowHeader-1'st/Left Column)

This is my code for selecting row:

dataGridView1.ClearSelection();
dataGridView1.Rows[BoPrI].Selected = true;
dataGridView1.FirstDisplayedScrollingRowIndex = BoPrI;

BoPrI is int variable that has Index Value

View 6 Replies View Related

Visual C++ :: Disable Controls And Change Window Size

Jun 6, 2013

I have created an exam environment for our schools, it comprises of 3 files; a .kix file that says if they are in the examination group run a .vbs file. The .vbs file kills the explorer.exe task so they don't have any taskbar or desktop shortcuts and then opens a .hta file.

The .hta file is a user interface that has icons for apps like Win Word that executes the application when you click on it. There is also a log off button.

Looking for some code that stops the students from being able to close, minimise and resize the window. Looking for code that can lock this down so they literally can't do anything except click the icons inside the window.

View 3 Replies View Related

C++ :: Method To Loop Through Network IPs

Nov 25, 2013

This problem relates to a program i am developing to ping all hosts on a network.

So far I've managed to access a PostgreSQL database to retrieve a CIDR network address e.g. 192.168.52.14/24.

I have then managed to mask the bits to get the network address.
So for e.g. above its 192.168.52.0

I now need some kind of algorithm to loop through available hosts so from.

192.168.52.0 - 192.168.52.255

I have got as far as deriving the network and separating it into an int array

So I have : ip_start[]= {192,168,52,0}

View 1 Replies View Related

C++ :: Threading Over The Network With Pthread Or TBB?

Jun 13, 2013

I'm wondering if there is a library for C++ that supports threading over the network, maybe with a threading pool and a specific protocol; or if there is just a de-facto protocol for doing threading over the network.

View 10 Replies View Related

Visual C++ :: Disable CCheckListBox Items Without Access To Code That Calls AddString

Apr 19, 2013

I need to be able to disable the items on a CCheckListBox but I can't change the code that calls AddString. I know I can use the CCheckListBox::Enable function to disable an item if I have an index but I don't have the index which would be provided by AddString.

I've tried intercepting the LB_ADDSTRING message and then looping through the items in the control but the string has not been added at this point so the last item in the list is never disabled.

I used Spy++ to see what messages were being sent and I noticed that LB_GETTEXT was sent so I tried intercepting this message (ugly hack) but this caused my app to hang - I assume because of the number of times the message is sent. Is there a way to disable the items?

View 10 Replies View Related

C++ :: Change Network Configuration Using Win32 VC++

Feb 28, 2013

I want to change my system IP, subnet mask, host name etc. using win32 VC++.

I've tried AddIPAddress function but that's not persistent.

I want to change it that it should be change without rebooting system and should be there after restarting the system.

View 3 Replies View Related

C# :: Difference When Starting A Program From Network?

Aug 17, 2012

The following code prevents windows from letting the monitor go into sleep mode when the program is active and wakes the monitor up after a scanner scans something.

Code:
protected override void WndProc(ref Message m) {
if (m.Msg == W32.Const.WM_SYSCOMMAND &&
(m.WParam.ToInt32() & 0xfff0) == W32.Const.SC_MONITORPOWER && m.LParam.ToInt32() != -1)
{
return;

[Code] ....

When the program is started normally it works fine. But when the program is started from a network share it goes to sleep anyway and the OnScan does not work anymore. Removing the Send Message line makes On Scan work again but then the monitor wont wake up on a scan of course.

What could be the problem here when started from the network?

View 1 Replies View Related

C++ :: Character Recognition With Artificial Neural Network

Feb 3, 2015

create a artificial neural network for character recognition. URL.....Background:

- I have a good understanding of C++ and Assembly code and currently working on my java skills.(PF1, PF2, Paradigms, and microprocessing classes)

-I've programmed microprocessors(PIC) and will be using a PIC32MZ processor to operate the camera data collection and ANN operation. Currently, I plan to program this PIC in Assembly and C since I do not know if C++ will work on the microprocessor hardware.

View 2 Replies View Related

C++ :: Network Programming - Multiplayer Online Game

Oct 1, 2014

How to use c++ to program network for a multiplayer online game or how would i go about this?

View 5 Replies View Related

C# :: Testing Devices For Up / Down Status On External Network?

Jul 11, 2014

I know I can use ping internally to test a device's connectivity. What can I use to test devices on another network (assuming ports are forwarded, and their IP addresses are at my disposal)? I was looking into the TCP Client class.. would that also work with devices using DynDNS?

View 7 Replies View Related

C++ :: Redirecting Network Traffic (building A Proxy)

Feb 3, 2015

I want to build a proxy, middleman between various client programs on my machine and servers outside, like this:

Client -> Proxy -> Server, Client <- Proxy <- Server.

OSes are Windows XP, 7 and 8.

Within that proxy I want to analyze data before it reaches it's destination and have full control over it to the point where I can prevent a packet from reaching it's destination if my program finds something suspisious going on. I need incoming and outgoing traffic of specific adresses and ports to be forwarded into my application on my client machine. My app then should deliver packets to their destination after they were analyzed.

The parts where data is received, analyzed, manipulated if needed, and sent is something I could code with no difficulty. But the concept of redirecting and forwarding is hard for me to grasp at the moment. I'd like to know at least what winsock functions I have to use.

If it's possible, I would like to use Windows libraries only, nothing from 3rd parties.

View 3 Replies View Related

C++ :: Deck Of Cards - No Output

Mar 5, 2013

I'm still new at C++, so my syntax might be a little off for getting the correct output. Currently, there are no compiler errors or warnings, but there is also no output when I run the program. It seems as if it is not calling something correctly maybe the .toString or perhaps my DeckOfCards constructor is a little off, either way, I can't seem to figure out why there is no output.

Anyways, here is my code:

Card.h
#ifndef CARD_H
#define CARD_H
#include <string>
using namespace std;
class Card {

[Code] ....

View 3 Replies View Related

C++ :: How To Shuffle A Vector (cards)

Mar 2, 2014

I am trying to write a sub-program that takes a deck of 52 cards and will shuffle it up using this algorithm:

Start with n=51
Repeatedly:
Generate a random integer between 0 and n. Call it i.
Swap card i and card n in the deck.
Decrease n by 1

However the code that I've written,

vector<int> shuffleDeck(vector<int> deckVector)//deckVector is the original deck in order
{
int temp, n, i, s;
n = 51;

[Code].....

when I output the new vector, only produces this output(note- it is a random number every time, but it just repeats over and over):

8 8 8 8 8 8 8 8 0 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8 8 8 8 8

or:

22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 0 22 22 22 22
22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22

View 1 Replies View Related

C++ :: How To Fill Cards In Deck

Sep 9, 2013

Here is my source code i am trying to write a function (fillAll) to fill all 52 cards in a deck and i would like to use my data struct for the function and make Deck one of my parameters.

enum suit{HEARTS, CLUBS, DIAMONDS, SPADES};
enum face{TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE};
struct Card{
suit suitType;
face faceType;

[Code] .....

View 10 Replies View Related

C# :: Listbox Loop - Getting Value Of Both Cards

Apr 3, 2015

I have a lstYourHand that has two cards in it, I loop through the listbox to get the values of both cards. I take the string value of the listbox item (strCardVal) and use a switch to give it an integer value (intCardVal). For some reason, when I run the code, the message Box at the end gives me the value 0 as a result, it does not register me giving it a value in the switch statement. My code is below:

Int32 intCardVal = 0;
String strCardVal;
Int32 intLoopCounter1;
for (intLoopCounter1 = 0; intLoopCounter1 == 1; intLoopCounter1++) {
strCardVal = lstYourHand.SelectedItem.ToString();

[Code] .....

View 3 Replies View Related

C# :: Mapped Network Drive - Deleting Or Moving A File

Sep 16, 2014

Currently I'm trying to do something extremely basic: delete or move a file

I have a mapped network drive (Y) where I have a file I need to move from one folder to another

First was doing the obvious:

System.IO.File.Move("Y:TempFile.txt", "Y:Temp2File.txt");

Not much to go wrong here, right? As long as I have the correct permission to write in the folders and the folders exists, this would normally go smooth. But for some reason it only copies the file. The source file still exists, but it has successfully copied the file to the destination folder. No exceptions has been thrown or anything... but the file still exists in the source directory

I then changed the code to the following:

System.IO.File.Copy("Y:TempFile.txt", "Y:Temp2File.txt");
System.IO.File.Delete("Y:TempFile.txt");
Console.WriteLine("See mommy, no Exceptions");

As expected the file copies correctly, but the delete command is completely ignored. The file is not deleted, but the Console.WriteLine command is called

I'm running the application as the logged in user. The user has permission to delete the file. If I try from Windows Explorer, the file is correctly deleted. Unfortunately my application refuses to delete the file and even worse, it will not even throw an Exception.

View 10 Replies View Related

C++ :: How To Make Standard Deck Of Cards

Feb 6, 2014

How to make a standard deck of cards and being able to shuffle and distribute the cards. I have made an array to store each card and I can display them but I assigned them all in order according to the suit and rank. Is this a viable way to do it if I intend to have a shuffle effect? Or should I create an array, randomly generate card, check for duplicates, then put them in the array, then display the array? Each card is a structure with two void pointer members for suit and rank.

View 1 Replies View Related

C :: Dealing A Deck Of Cards Using Structs?

Sep 9, 2013

I have a deck of 108 cards inside a 2D array and want to deal these card by 7 to 4 player. Each player had a id. The player and id are stored in a file while i've read in array each. Now I have to deal the cards.

Code:

struct card{
char color;
int rank;
char action[24];
char location[108]; Code: struct players{char name[10];
int id[5];
char hand;
};

View 2 Replies View Related

C :: Read 5 Cards Then Display A Text Value?

Jan 24, 2013

I want it to read 5 cards then display a text value

Code:
#include <stdio.h>
int main( void ) {
char inputtedhand[25];

[Code]....

View 3 Replies View Related

C/C++ :: Creating And Loading Array Of Cards?

Oct 6, 2014

I am working on a program that is supposed to eventually be able to evaluate bridge hands, but one of the first things I need to do is create and load an array. The program is supposed to read in hands from a file (each line in the file is a hand of 13 cards), evaluate these hands based on a list of rules, and display the results.

Here is the file that will be used for the program:

2C QD TC AD 6C 3D TD 3H 5H 7H AS JH KH
3C 4C 2D AC QC 7S 7C TD 9C 4D KS 8D 6C
2C 3C KC JC 4C 8C 7C QC AC 5C 9C 6C TC
5H 3S 4D KC 9S 3D 4S 8H JC TC 8S 2S 4C
2S 5D 6S 8S 9D 3C 2H TH
2H 6D %S 8S 7S 4D 3H 4S KS QH JH 5C 9S
2C QD TC AD 6C 3D TD 3C 5H 7H AS JH KD QS
2C QD TC AD 6C 3D TD 2C 5D 7H AS JH KD
2H 6D TS 8Z 7S 4D 3H 4S KS QD JH 5C 9S

I've gone through and wrote out what the program is supposed to do and what I think is needed and what steps to take to accomplish this, but am getting stuck on the array. If you can't tell I'm extremely new to this and am still learning. I'm not sure how to create and load an array like this since it seems to me there'd be two elements per index, a suit and a value.

Also, the instructions mention that I will need a data structure to hold the cards in an ordered manner. I'm really confused on this as well, if I'm using an array, how does the data structure come into play?

Can the data structure be used in place of the array?

Here is the code I have so far, but keep in mind that at the moment all it actually does is open the file (The "File is open" message will be taken out as the code progresses, I just threw that in there to make sure the file was actually being opened):

//#include <program3.h>
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main() {
char handsArray[];
ifstream bridgeFile;

[code]....

The input should be sorted by suit and the rank within the suit and be displayed in teh following format:

Clubs 10 6 2
Diamonds A Q 10 3
Hearts K J 7 5 3
Spades A
Points = 16

View 3 Replies View Related

C Sharp :: Centralize Database On The System On Local Area Network?

Aug 9, 2013

I wrote an application with wpf and c sharp. And I use ado dotnet framework to connect the database. Now the problem is I want a centralize database for the application. And I hav e installed sql server on one of the which I want to serve as server. I now want all other clients to be able to connect to the database through local area network. how will I do that?

View 2 Replies View Related







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