Click here to Skip to main content
15,905,148 members
Home / Discussions / C#
   

C#

 
QuestionWhy do not save Login file in Server Explorer Pin
Member 1228884025-Apr-16 13:24
Member 1228884025-Apr-16 13:24 
AnswerRe: Why do not save Login file in Server Explorer PinPopular
OriginalGriff25-Apr-16 19:55
mveOriginalGriff25-Apr-16 19:55 
GeneralRe: Why do not save Login file in Server Explorer Pin
Sascha Lefèvre25-Apr-16 21:21
professionalSascha Lefèvre25-Apr-16 21:21 
GeneralRe: Why do not save Login file in Server Explorer Pin
Member 1228884026-Apr-16 5:11
Member 1228884026-Apr-16 5:11 
GeneralRe: Why do not save Login file in Server Explorer Pin
OriginalGriff26-Apr-16 5:23
mveOriginalGriff26-Apr-16 5:23 
GeneralRe: Why do not save Login file in Server Explorer Pin
Member 1228884026-Apr-16 16:21
Member 1228884026-Apr-16 16:21 
GeneralRe: Why do not save Login file in Server Explorer Pin
OriginalGriff26-Apr-16 19:58
mveOriginalGriff26-Apr-16 19:58 
GeneralRe: Why do not save Login file in Server Explorer Pin
Member 1228884027-Apr-16 4:54
Member 1228884027-Apr-16 4:54 
GeneralRe: Why do not save Login file in Server Explorer Pin
Pete O'Hanlon27-Apr-16 6:29
mvePete O'Hanlon27-Apr-16 6:29 
GeneralRe: Why do not save Login file in Server Explorer Pin
Sascha Lefèvre26-Apr-16 5:40
professionalSascha Lefèvre26-Apr-16 5:40 
GeneralRe: Why do not save Login file in Server Explorer Pin
OriginalGriff26-Apr-16 6:32
mveOriginalGriff26-Apr-16 6:32 
QuestionHelp with Listbox and comboBox Pin
Member 1231776424-Apr-16 23:40
Member 1231776424-Apr-16 23:40 
AnswerRe: Help with Listbox and comboBox Pin
koolprasad200324-Apr-16 23:55
professionalkoolprasad200324-Apr-16 23:55 
GeneralRe: Help with Listbox and comboBox Pin
Member 1231776424-Apr-16 23:56
Member 1231776424-Apr-16 23:56 
AnswerRe: Help with Listbox and comboBox Pin
BillWoodruff26-Apr-16 4:04
professionalBillWoodruff26-Apr-16 4:04 
GeneralRe: Help with Listbox and comboBox Pin
Sascha Lefèvre26-Apr-16 5:12
professionalSascha Lefèvre26-Apr-16 5:12 
QuestionHow to get/set SharePoint 2013 MySite properties through API? Pin
Coding Eyes24-Apr-16 23:32
Coding Eyes24-Apr-16 23:32 
AnswerRe: How to get/set SharePoint 2013 MySite properties through API? Pin
Eddy Vluggen25-Apr-16 3:12
professionalEddy Vluggen25-Apr-16 3:12 
QuestionHow to get selected item data of listView Column Item? Pin
0HourCoder23-Apr-16 9:36
0HourCoder23-Apr-16 9:36 
AnswerRe: How to get selected item data of listView Column Item? Pin
Sascha Lefèvre23-Apr-16 9:59
professionalSascha Lefèvre23-Apr-16 9:59 
GeneralRe: How to get selected item data of listView Column Item? Pin
0HourCoder23-Apr-16 10:25
0HourCoder23-Apr-16 10:25 
AnswerRe: How to get selected item data of listView Column Item? Pin
Simon_Whale23-Apr-16 22:24
Simon_Whale23-Apr-16 22:24 
QuestionI have this code that scans the memory of a program, the more programs that precision much memory takes a long time !! Any faster jeito to do this? Pin
Member 1248006323-Apr-16 5:46
Member 1248006323-Apr-16 5:46 
C#
SYSTEM_INFO sys_info = new SYSTEM_INFO();
            GetSystemInfo(out sys_info);

            IntPtr proc_min_address = sys_info.minimumApplicationAddress;
            IntPtr proc_max_address = sys_info.maximumApplicationAddress;

            // salvar os valores como inteiros longos por isso não vou ter que fazer um monte de moldes mais tarde
            long proc_min_address_l = (long)proc_min_address;
            long proc_max_address_l = (long)proc_max_address;

            // Abrir o processo com nível de acesso desejado
            IntPtr processHandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_WM_READ, false, process.Id);

            // este irá armazenar qualquer informação que recebemos de VirtualQueryEx()
            MEMORY_BASIC_INFORMATION mem_basic_info = new MEMORY_BASIC_INFORMATION();

            int bytesRead = 0;  // Com o número de bytes ler ReadProcessMemory

            string arquivoName = string.Format(@"Dumps\Dump_{0}_{1:dd_MM_yyyy HH_mm_ss}.txt", process.ProcessName, DateTime.Now);
            using (FileStream fs = File.Create(arquivoName))
            {
                using (StreamWriter sw = new StreamWriter(fs))
                {
                    while (proc_min_address_l < proc_max_address_l)
                    {
                        // 28 = sizeof(MEMORY_BASIC_INFORMATION)
                        VirtualQueryEx(processHandle, proc_min_address, out mem_basic_info, (uint)Marshal.SizeOf(typeof(MEMORY_BASIC_INFORMATION)));

                        // Se este pedaço de memória é acessível
                        if (mem_basic_info.Protect == PAGE_READWRITE && mem_basic_info.State == MEM_COMMIT)
                        {
                            byte[] buffer = new byte[mem_basic_info.RegionSize];

                            // ler tudo no tampão atrás referido
                            ReadProcessMemory((int)processHandle, mem_basic_info.BaseAddress, buffer, mem_basic_info.RegionSize, ref bytesRead);

                            string info = string.Empty;
                            // Em seguida, a este arquivo de saída
                            for (int i = 0; i < mem_basic_info.RegionSize; i++)
                            {
                                if ((char)buffer[i] != '\0')
                                {
                                    string buf = string.Concat((char)buffer[i]);
                                    string pattern = @"(\d|=|\s)";
                                    Match match = new Regex(pattern).Match(buf);

                                    if (match.Success)
                                        info = string.Format("{0}{1}", info, buf);
                                }
                            }

                            sw.WriteLine(info);
                        }
                        // ir para o próximo pedaço de memória
                        proc_min_address_l += mem_basic_info.RegionSize;
                        proc_min_address = new IntPtr(proc_min_address_l);
                    }
                    sw.Close();
                }
            }
        }

AnswerRe: I have this code that scans the memory of a program, the more programs that precision much memory takes a long time !! Any faster jeito to do this? Pin
OriginalGriff23-Apr-16 5:57
mveOriginalGriff23-Apr-16 5:57 
Questionhow do I get the information from a site of a button? Pin
Member 1248006323-Apr-16 5:12
Member 1248006323-Apr-16 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.